vim配置步骤

来源:互联网 发布:win7远程桌面连接mac 编辑:程序博客网 时间:2024/05/17 00:01

Step 1. Install the vim by apt-get.

sudo apt-get updatesudo apt-get vim

Step 2. Configure the vim by editing the vimrc.

sudo vim /etc/vim/vimrc

Step 3. Configuring.

set number"显示行号syntax on"语法高亮set foldmethod=syntax"代码折叠colorschemeron"设置自带配色模式"autocmd InsertLeave * se nocul"autocmd InsertEnter * se culset cursorline"高亮显示当前行"set cursorcolumn"高亮显示当前列hi CursorLine cterm=NONE ctermbg=black guibg=red guifg=bluehi CursorColumn cterm=NONE ctermbg=black guibg=red guifg=redset noexpandtab"不用空格代替制表符set cindent"C风格缩进set smartindent"自动缩进set tabstop=4"制表符占位=4set softtabstop=4"统一缩进=4set shiftwidth=4"统一缩进=4set scrolloff=3"光标距离顶部和底部3行set laststatus=2"底部状态栏行数set enc=utf-8"设置vim内部编码为UTF-8set fileencodings=utf-8,gbk"使用UTF-8或者GBK打开文件set history=999"历史记录的行数set showmatch"显示匹配括号set nocompatible"关闭兼容VI,避免前版本兼容性问题set ignorecase"检索时忽略大小写set helplang=cn"中文帮助文档call pathogen#infect()"powerline{set guifont=PowerlineSymbols\ for\ Powerlineset t_Co=256"let g:Powerline_symbols='fancy'"}


原创粉丝点击