vi显示行号

本文介绍如何在Vim编辑器中设置显示行号和取消显示行号的方法,通过简单的命令:setnu和:setnu!,用户可以轻松地切换行号的显示状态。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

显示行号

:set nu

取消显示行号

:set nu!

例如:
vi error.log

    2019-01-04T11:10:34.238599+08:00 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
    2019-01-04T11:10:34.246165+08:00 0 [Warning] InnoDB: Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
    2019-01-04T11:10:34.246191+08:00 0 [Warning] InnoDB: Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
     100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
     100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
     100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
     100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
    2019-01-04T11:11:40.243858+08:00 0 [Warning] InnoDB: New log files created, LSN=48433
    2019-01-04T11:11:40.351304+08:00 0 [Warning] InnoDB: Creating foreign key constraint system tables.
    2019-01-04T11:11:40.414609+08:00 0 [Warning] unknown variable 'loose_rpl_semi_master_wait_point=after_sync'
  :set nu
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值