-
Website
http://www.tech-recipes.com/ -
Original page
http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
davak
83 comments · 1 points
-
danishbacker
9 comments · 1 points
-
flexinfo
11 comments · 1 points
-
bej
4 comments · 1 points
-
dimithri
5 comments · 1 points
-
-
Popular Threads
-
Windows 7: How to Prevent the Mouse from Waking your PC
5 days ago · 2 comments
-
Outlook 2010: Turn Off Attachment Preview
1 week ago · 2 comments
-
Gmail: How to Send SMS Messages Without Using Email
2 weeks ago · 2 comments
-
Thunderbird 3: How to Download Images Automatically
2 weeks ago · 1 comment
-
Windows 7 – Prevent Live Messenger from Opening at Start Up
2 weeks ago · 1 comment
-
Windows 7: How to Prevent the Mouse from Waking your PC
:set number
to the file .vimrc in your home directory.
Sometime when you get bored, type :set all while in vim.. it'll show you all the available options. Chances are if there's some behavior you don't like in vim, you can tweak it.
set number
~/.vimrc
Here's what I did:
Edit ~/.vimrc
add these lines:
nnoremap <silent> <F6> :set number<CR>
nnoremap <silent> <S-F6> :set nonumber<CR>
Now, F6 turns line numbers on, Shift F6 turns them off.
nnoremap <silent> <F6> :set number!<CR>