문제

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?

도움이 되었습니까?

해결책 2

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top