Determine current file position in vi or vim

Posted February 16, 2004 by Rex in 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.

The Conversation

Follow the reactions below and share your own thoughts.