Domanda

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?

È stato utile?

Soluzione

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

Altri suggerimenti

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'.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top