Determine current file position in vi or vim

Contributor Icon Contributed by Rex Date Icon February 16, 2004  
Tag Icon Tagged: UNIX


To quickly determine the current line number in a file, just press ^g (control-G) when in command mode (not insert mode). The filename, current line number, and total number of lines will be displayed.

Previous recipe | Next recipe |
 
blog comments powered by Disqus