![](/img/trans.png)
[英]VIM change folding markdown to show lines and number of words using vimrc
[英]Why doesn't Vim show number lines after editing .vimrc
我已经编辑了.vimrc文件,使其包含以下行:
set number
我已经保存了文件并完全关闭了vim,重新打开文件时仍然没有行号。
这是位于/ usr / share / vim / vimrc的整个文件
" Configuration file for vim
set modelines=0 " CVE-2007-2438
" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible " Use Vim defaults instead of 100% vi compatibility
set backspace=2 " more powerful backspacing
" Don't write backup file if vim is being called by "crontab -e"
au BufWrite /private/tmp/crontab.* set nowritebackup
" Don't write backup file if vim is being called by "chpass"
au BufWrite /private/etc/pw.* set nowritebackup
set number
编辑vimrc文件(系统默认文件之一或主目录中的文件)后,应使用source命令,如下所示读入文件并使这些配置在当前会话中有效。
:source ~/.vimrc
要么
:source /usr/share/vim/vimrc
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.