I'm new to vim. I'm using MacVim.
I use
:set number
which shows line numbers.
I've added
set number
to my vimrc, to make show line numbers by default.
My vimrc:
no <down> <Nop>
no <left> <Nop>
no <right> <Nop>
no <up> <Nop>
ino <down> <Nop>
ino <left> <Nop>
ino <right> <Nop>
ino <up> <Nop>
set number
But line numbers don't show up.
Everything in vimrc except set number
works fine. What am I doing wrong?
Problem was that I had one .vimrc
in the ~/
and one in the ~/.vim/.vimrc
. The one that was in the ~/
was overriding the one in in ~/.vim/.vimrc
.
I'd comment but I'm not allowed :(
I usually have had that problem when either the file or the line is corrupted or has Ctrl characters or in someversions of Unix if there was a space in the wrong place
try :set list and make sure there isn't a Tab, missing Line Feed or something
There's a way of viewing the Control Characters that don't display in :set list but can't remember it.
Shove comes to push delete the line and the one above and below. Save and retype it andsee if it fixes it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.