Tips for golfing in V What general tips do you have for golfing in V? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to V (e.g. "remove comments" is not an answer).

Since V is heavily based on vim, most of the tips for golfing vim would apply too. But there are some features in V that don't really apply to vim.

Please post one tip per answer.
Take advantage of implicit endings! 

In V, every single command will be implicitly finished if you don't actually finish out the command. For example, if the program ends in insert mode, the &lt;esc&gt; will be filled in automatically. Usually, this doesn't make any difference. However, if you have a count before the i, you have to actually hit &lt;esc&gt; at the end for the text to be inserted multiple times. So you can do 2i2i for a quine, whereas in vim you would need 2i2i&lt;esc&gt;, which is no longer a quine.

This also applies to ex commands, and psuedo ex-commands such as compressed regexes. So where vim needs

:foo&lt;cr&gt;


V can do

:foo


if it's at the end of the program.

But here is where it gets really cool: The implicit ending applies several layers deep. For example, consider this command:

òçfoo/óa


This translates to:

ò           " Recursively:
 çfoo/      "   On every line matching 'foo'
      óa    "     Remove the first 'a'


Without implicit endings, the ó needs a &lt;cr&gt;, the ç needs a &lt;cr&gt;, and the ò needs another ò. But none of these are needed with implicit endings! The interpreter will fill in the needed ò, the recursive command will fill in the &lt;cr&gt; that ç needs, and the ç command will fill in the &lt;cr&gt; that ó needs. This saves us 3 bytes.