Vi 中如何去掉行号?
为了显示文件中的行号,我使用命令:
set numbers
从文件中清除行号的命令是什么?
For displaying line numbers in a file, I use command:
set numbers
What is the command to clear line numbers from the file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
如果您正在谈论 vi/vim 中的显示行号命令,
您可以使用
打开并
将关闭行号显示或
关闭行号的显示
If you are talking about show line number command in vi/vim
you could use
in commandline mode to turn on and
will turn off the line number display or
to toggle off display of line numbers
显示行号:
停止显示行号:
它是 :set nonumber ps 的缩写
。这些命令将在正常模式下运行。
Display line numbers:
Stop showing the line numbers:
Its short for :set nonumber
ps. These commands are to be run in normal mode.
要关闭行编号,请再次按照前面的说明进行操作,但这次在 : 提示符处输入以下行:
To turn off line numbering, again follow the preceding instructions, except this time enter the following line at the : prompt:
要关闭行号,可以使用以下任何命令:
For turning off line numbers, any of these commands will work:
轻松显示行号:
:set nu
或:set number
如果每次启动
vi/vim
时都需要数字,请将以下行附加到您的~/.vimrc
文件:在特定位置/行号打开文件
Easily Display Line number:
:set nu
or:set number
If you need number every time you start
vi/vim
, append following line to your~/.vimrc
file:Open a file at particular location/line number
如果你使用一些 vim 包。
If you are using some vim bundles.
来自文档“掌握 VI 编辑器”:
From the Document "Mastering the VI editor":
设定数量
set nonumber
DO 在
.vimrc
内工作,并确保不要在.vimrc
中的命令前面加上:
set number
set nonumber
DO work inside
.vimrc
and make sure you DO NOT precede commands in.vimrc
with:
在终端中写入命令:
用于设置数量:
写入设置号码
为删除号码 :
写设置nonumber
write command in terminal:
for set the number:
write set number
for remove number:
write set nonumber