New answers tagged

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 ...
Friedrich's user avatar
  • 1,259
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 ...
Rich's user avatar
  • 31.3k
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.
Vivian De Smedt's user avatar
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 ...
D. Ben Knoble's user avatar
  • 25.4k
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 ...
Martin Kealey's user avatar
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@=)/
Vivian De Smedt's user avatar

Top 50 recent answers are included