New answers tagged regular-expression
1
vote
Vim mapping to make function parameters become multi-line?
To solve this without a plugin, the following pure Vim solution relying on :substitute and = could be used. It's hard to provide a "works for all languages" solution as syntax differs ...
1
vote
Vim mapping to make function parameters become multi-line?
If you're happy to install a plugin, you could try Andrew Radev's splitjoin.
It works with a wide range of languages, and you can configure new ones if necessary. By default it uses gS to split a ...
1
vote
Vim mapping to make function parameters become multi-line?
You could be interested to the following: vim-argwrap plugin.
It provides an :ArgWrap command that seems to do exactly what you want.
1
vote
Vim mapping to make function parameters become multi-line?
A first start might be using tpope’s surround plugin to do cS(( to make the parens multi-line. Then you could attempt one of the substitutions like :substitute/, /,\r/g and clean up. But this last ...
0
votes
With regex, how to match misused blankspace inside tab indent
I would just search for ^\t*\zs \+\ze\t
This avoids a performance-killing look-behind: match any number of leading tabs, then at least one space, then at least one more tab.
The run of space ...
1
vote
Accepted
With regex, how to match misused blankspace inside tab indent
I would do:
/\v((^\s*\t)@<= +|(^\s*)@<= +\t@=)/
For performance reason you could do (limiting the lookahead to 80 bytes):
/\v((^\s*\t)@80<= +|(^\s*)@80<= +\t@=)/
Top 50 recent answers are included
Related Tags
regular-expression × 554substitute × 97
search × 88
replace × 63
vimscript × 56
syntax-highlighting × 42
global-command × 19
vimrc × 14
highlight × 14
neovim × 13
command-line × 11
functions × 11
macro × 11
search-replace × 10
key-bindings × 9
ex-mode × 9
find × 9
autocmd × 8
delimiter-matching × 8
normal-mode × 6
register × 6
filetype-markdown × 6
unicode × 6
multiple-lines × 6
gvim × 5