:set ts=4 :set shiftwidth=4 :set expandtab :set autoindent To view the current value of the option - type :set {option}?. Example: :set ts? To reset the value of the option to its default - type :set {option}&. Example: :set ts& Got any vim Question?# Ask any vim Ques...
cat<<EOF>/root/.vimrcsetnoexpandtabsetnoautoindentsettabstop=4EOF :setnu:setnonu 设置与取消行号。:syn on:syn off 是否依据语法显示相关的颜色帮助。在Vim中修改相关的配置文件或Shell脚本文件 时(如前面示例的脚本/etc/init.d/sshd),默认会显示相应的颜色,用来帮助排错。如果觉得颜色产生了干扰,则可以取...
vim-surround— surround.vim:quoting/parenthesizingmade simple delimitMate— Vim plugin, provides insert modeauto-completion for quotes, parens, brackets, etc. vim-fugitive— fugitive.vim: a Git wrapper so awesome, it should be illegal vim-togglelist— Functions totogglethe Location List and the Q...
backspace=indent,eol,start set backspace=2 " 启用自动对齐功能,把上一行的对齐格式应用到下一行 set autoindent " 依据上面的格式,智能的选择对齐方式,对于类似C语言编写很有用处 set smartindent " vim禁用自动备份 set nobackup set nowritebackup set noswapfile " 用空格代替tab set expandtab " 设置显示...