search'n'replace with newlineThis extension adds a feature, which should be included natively in VSCode. But the find/replace in VSCode does not get use of special characters like \r\n or \t. My motivation for this extension is, that VSCode will include the feature and I can remove this extension. But for now, feel free to use it. Many downloads could bring it to attention of VSCode developers. :) Use CaseRegularily, lets say once per day, I get a logfile or whatever without any newlines. So I have to format it myself. The most important thing then is to search for something like '2015-02-01' and replace it with '\n2015-02-01'. I think many people have use cases similar to this so I decided to share my extension. How to useSince the vscode-API does not offer any UI capabilities, everything is done via commands.
LimitationsVSCode will treat your linebreaks like the ones the file is set to. So if your file shows "CRLF" in the statusbar, it will normalize all linebreaks to this one. So it doesn't make a difference if you enter Windows (\r\n), Linux/Mac (\n) or ClassicMac (\r) linebreaks. Since there is no UI for extensions, all search-mode-combinations are listed in one large list. But at least you can type in the mode instead of using the mouse. |