问题
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?
回答1:
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//
来源:https://stackoverflow.com/questions/36579720/how-to-remove-line-numbers-in-vim