设置主题
本主机vim 主题存放位置位于
/usr/share/vim/vim80/colors
image.png
从github 上下载主题(.vim格式)
git clone https://github.com/whatyouhide/vim-gotham.git
image.png
移动至存放vim 主题路径
cp gotham.vim /usr/share/vim/vim80/colors/
image.png
设置 ~/.vimrc 配置文件
image.png
1 set number
2 syntax on
3 set hlsearch
4 " 设定编码
5 set enc=utf-8
6 set fileencodings=ucs-bom,utf-8,chinese
7 set langmenu=zh_CN.UTF-8
8 " 自动补全
9 filetype plugin indent on
10 set completeopt=longest,menu
11 colorscheme gotham
12 " 自动缩进
13 set autoindent
14 set cindent
15 " Tab键的宽度
16 set tabstop=4
17 " 统一缩进为4
18 set softtabstop=4
19 set shiftwidth=4
20 " 使用空格代替制表符
21 set expandtab
22 " 在行和段开始处使用制表符
23 set smarttab
24 " 显示行号
25 set number
26 " 历史记录数
27 set history=1000
高亮显示
在~/.vimrc 中加入
" 设置高亮模式
syntax on