Pregunta

Is there a way to repeat a fold command I just executed? For example, say I am folding away a few tags with "zfat", how can I repeat the fold command I just executed without typing it again in its entirety?

¿Fue útil?

Solución

Other option (besides mapping, as mention by lya):

 qqzfatq

Now @q repeats that. @@ repeats the last-used macro so you could actually do @@j@@j@@j@@ or similar to repeat more often.

Alternatively, you can include the motion (if it was necessary), for example assuming j is the motion to move to the next tag to be folded:

 qqzfatjq

Now, 10@q folds 10 successive tags

Otros consejos

There is no easy way as long as I know. Maybe you can use macros or key mapping, i.g.

:map <F2> zfat

Then just press 'F2' to execute 'zfat'.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top