Vim 行號的顯示與隱藏

Vim 行號的顯示與隱藏

1、當前文檔的顯示與隱藏

1 打開一個文檔html

[root@pcname ~]# vim demo.txt
This is the main Apache HTTP server configuration file.  It contains the
configuration directives that give the server its instructions.
See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
In particular, see
<URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
for a discussion of each configuration directive.

2 顯示行號 vim 命令 :set number 或者 :set nuapache

1 
  2 This is the main Apache HTTP server configuration file.  It contains the
  3 configuration directives that give the server its instructions.
  4 See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
  5 In particular, see
  ********爲了兩位婁行號效果並節省篇幅,此處省略幾行********
 16 with "/", the value of ServerRoot is prepended -- so 'log/access_log'
 17 with ServerRoot set to '/www' will be interpreted by the
 18 server as '/www/log/access_log', where as '/log/access_log' will be
 19 interpreted as '/log/access_log'.
 20

3 隱藏行號 vim 命令 :set nonumber 或者 :set nonu 便可隱藏vim

2、全部文檔行號的顯示與隱藏

根據需求去配置當前用戶和全部用戶code

/etc/vimrc   是系統範圍的初始化配置
~/.vimrc     我的的vim初始化配置

以當前用戶爲列orm

vim ~/.vimrc

咱們在配置文件輸入set number 或者 set nu 保存便可server

參考文檔:wang_yubin92htm

相關文章
相關標籤/搜索