Open file at line number
Start vim with cursor on line 42
vim +42 file.txt
- tool
- vim10 commands
More vim commands
-
/pattern (n/N next/prev) ?pattern (backward)/ searches forward, ? searches backward; n/N cycle results
-
:g/^#/dDelete all lines starting with # (comment lines)
-
gg=GGo to top (gg), re-indent to end of file (=G)
-
qa (record into a) q (stop) @a (play) 10@a (play 10 times)Macros automate repetitive edits in vim
-
:set numberToggle line numbers on (use :set nonumber to hide)