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?
How to remove line numbers in vim?
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//
© 2022 - 2024 — McMap. All rights reserved.
help rnu
? instead od trying:%!cat -n
– Dessiatine:%!cat -n
command directly from vim. So basicly if you open vim and issue the:%!cat -n
command the line numbers will appear, but how to remove them? – Seventieth