sponsor Vim development Vim logo Vim Book Ad

basic Tip #511: key mapping for goto the absolute line number

 tip karma   Rating -12/14, Viewed by 1013 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   July 20, 2003 20:30      complexity:   basic
author:   Sean Chen      as of Vim:   6.0

It's quite simple,
nmap <ENTER><ENTER> G
Now, you can keep the original [count]<ENTER> function and have an easier way to goto the abolute line number.
Have a nice day!

 rate this tip  Life Changing Helpful Unfulfilling 

<< one way to set $VIMRUNTIME within vimrc | Automatic insertion of C/C++ header gates >>

Additional Notes

jigho@caramail.com, July 20, 2003 23:35
Why do you need to add a third entry for an action that already have 2 ?
     "<count>G"   or
     ":<count><enter>"
are enough, don't you think ?
animesh@motorola.com, July 21, 2003 7:31
"<count>G"   or
":<count><enter>"

out of these two options, second one needs 3... for the first one, I prefer "<count><ENTER><ENTER>" over "<count>G".
gsinclair@soyabean.com.au, July 22, 2003 8:30
57gg to go to hte 57th line does me fine, thank you very much!
gsinclair@soyabean.com.au, July 22, 2003 8:30
57gg to go to the 57th line does me fine, thank you very much!
kallumama, July 30, 2003 10:01
I dont know if this is useful at all.

If you want to go up 17 lines, type

17<backspace>

in command mode
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to vim@vim.org after searching the archive. Help Bram help Uganda.
   
Sponsored by Web Concept Group Inc. SourceForge.net Logo