Just editing a large markdown file with a number of fenced code blocks (mine also include a language specifier) and, while editing one of those code blocks, I have noticed the extension trying to insert bullet points, and interfering with indentation when I press enter to go to a new line.
I'd suggest that the extension should try to detect if it's currently inside of a fenced code block and avoid further processing, instead deferring to normal editor behaviour until the cursor leaves the fenced code area.
I agree with you. Let me have a try.
Solved with v0.7.2 👌
Kind of working - automatic indentation is not occurring when pressing enter inside of a fenced code block.
😮 As I've override the default Enter, I found it's not so easy to re-implement the indentation rules. I opened another issue to track this #9.
In my workflow, I always edit the code in the source file, and then copy-and-paste it to the MD file. I think that's much better because of the other features such as IntelliSense. That's my suggestion before I solve that issue.
fwiw, my use of markdown is for planning and note-taking, not documentation. I interleave snippets of code among paragraphs and bullet lists that describe my thought process as I work out the architecture of my project. Code is the end result for me, not the starting point, just as an architect doesn't build the house before drawing up the plans. Writing the code somewhere else and then pasting it in isn't really applicable for my use case. It's ok, I've disabled the extension for now.
Since it seems to be an important functionality for you, I can implement a very basic one as a temp workaround. That is, just keeping the indentation of previous line. What do you think of it?
For other indentation rules, I said it's not that easy because we have many kinds of them (indent, outdent, indentoutdent ...), and they might be different among different languages.
(BTW, we can move to #9 for further discussion.)
Could you please give me an example document text?
My notes are generally kind of my own personal process, but this one is really old, so I guess I can attach it. What you see here has numerous snippets of code embedded throughout the document and is fairly typical of my process.
devnotes-4.zip
Thanks, I'll have a look and see what I can do
See here.
I guess the basic part will cover most of your use cases. Feel free to comment there.
Most helpful comment
Solved with v0.7.2 👌