VIM 我的配置
程序员文章站
2024-02-21 11:28:34
...
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
set hidden " Hide buffers when they are abandoned
set nu
set tabstop=4
set smarttab
set shiftwidth=4
set autoindent
set cindent
set cursorline "高亮当前行,即当前行下面显示一条线
"禁用自动插入注释,然而并没有生效
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
"下面这行可以手动设置单个会话取消自动注释
"set formatoptions-=cro