Cristian
Cristian

Reputation: 1670

How to remove line numbers in vim?

I have set line numbers in vim using :%!cat -n as suggested here. The line numbers appeard but now when I open vim I am getting 'E481: No range allowed:' errors and now I want to get rid of the line numbers. But how?

Upvotes: 0

Views: 805

Answers (1)

SaintHax
SaintHax

Reputation: 1943

First, you can try this to get the line numbers:

:%!cat -n %

If you've not saved, you can revert back to the last save:

:e!

If you have the line numbers, then you can get rid of them like this

:%s/^[[:blank:]]*[0-9]*\t// 

Upvotes: 3

Related Questions