Sunday 3 November 2019

How do you create a vim key mapping that requires numbers before the hotkey (like )?


I want to create a mapping like the G hotkey that jumps to a line (e.g., to jump to line 10: 10G). How can I do that?



Answer



You can obtain that number from the v:count or v:count1 variable. See


:help v:count

For example,


:map G :echo v:count

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...