本文介绍了如何删除VIM行号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用vim的设置行号:%!猫-n 的建议<一href=\"http://stackoverflow.com/questions/252766/add-line-numbers-to-source-$c$c-in-vim/252774?noredirect=1#comment60758218_252774\">here.
行号appeard但现在当我打开vim的我得到E481:没有允许的范围的错误,现在我想摆脱的行号。但如何?

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?

推荐答案

首先,你可以试试这个让行号:

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//

这篇关于如何删除VIM行号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 22:40