![]() ![]() editorconfig file within Windows Explorer, you need to create a file named. Properties from matching EditorConfig sections are applied in the order they were read, so properties in closer files take precedence.įor Windows Users: To create an. editorconfig files will stop if the root filepath is reached or an EditorConfig file with root=true is found.ĮditorConfig files are read top to bottom and the most recent rules found take precedence. editorconfig in the directory of the opened file and in every parent directory. When opening a file, EditorConfig plugins look for a file named. indent_style = space indent_size = 2Ĭheck the Wiki for some real-world examples of projects using EditorConfig files. end_of_line = lf insert_final_newline = true # Matches multiple files with brace expansion notation Note that this will not work on code that is indented with tabs - it only adds and removes spaces in groups of four, or if the indentation is all tabs then it behaves exactly as though the tabs were a part of the code, not whitespace.Root = true # Unix-style newlines with a newline ending every file Repeating the same shortcut causes the editor to keep removing four spaces until it is no longer possible to do so, by which time the selection is no longer a proper Markdown code block. So the editor also treats it as a code block, and the shortcut (or the "Code Sample" icon in the editor UI) removes the spaces in an attempt to convert it back to plain text - except in the case of excess indentation all you get is another code block, albeit with less indentation. ![]() So I don't blame you for not realizing this.īut now that I think about it, I understand why it works this way: as long as every line in the selection contains four leading spaces, the Markdown parser considers the selection to be a code block. I've been using this same keyboard shortcut for years to perform similar edits on numerous posts, but I never understood why it worked, and I don't think it ever would have occurred to me if it weren't for the fact that I discovered it entirely by accident. Once it is no longer possible to remove four spaces leading each line, the shortcut then alternates between removing and adding four spaces. ![]() ![]() For reasons previously unbeknownst to me, the same keyboard shortcut that you use to format unformatted code as Markdown code blocks ( Ctrl+ K) can also be used to reduce the indentation of code blocks that have too much indentation - four spaces a punch. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |