![]() " Insert a newline after each specified string (or before if use '!').Ĭommand! -bang -nargs=* -range LineBreakAt ,call LineBreakAt('', ) ![]() Save the script in a file called linebreakat.vim. The following script defines a user command to automate the insertion of line breaks. Similarly, we don't want to break on a comma but on the next non-space character.įinally here's a way to map this rather combersome line to the sequence of key 'gob' in normal mode: The first part is mostly the same as in the previous example, but we separate the regex in 3 using alternation \| and use the atomic \zs to specify we don't want to break on ( but on the next character. In normal mode = is to auto-indent code (it usually works well but might not be optimal with python). The ' range specifies the previously affected range. ![]() Use :%s//\r
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |