vim 语法着色完全配置

原文地址:http://blog.sina.com.cn/s/blog_878940b3010156ku.html

在终端输入:sudo vim /etc/vim/vimrc   打开配置文件。
编辑命令:
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 syn=cpp
set nu!
set hlsearch
map <Up> gk
map <Down> gj
set cursorline
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set nohls
set mouse=a
syntax on
保存就可以了。
如果还不行的话,就在终端输入:sudo apt-get install vim-full就可以了。

原文地址:https://www.cnblogs.com/AloneSword/p/5066827.html