基本配置
1 | set encoding=utf-8set rulerset numberset nowrapset ciset ts=4set sw=4syntax enableset history=1000set wildmenuset expandtabset helplang=cnset sts=4set showmatchset hlsearchfiletype onfiletype plugin onfiletype indent onset autowriteset cursorlineset autoreadset scrolloff=2set autoindent |
主题
查看主题
执行以下命令(将 vim80 替换为自己的版本,可以到相应目录下 ls
一下即可)
1 | ls /usr/share/vim/vim80/colors |
列表中的文件就是可使用的 vim 主题。
添加主题
下载相对应的主题文件到 /usr/share/vim/vim80/colors
或者到 ~/.vim/colors
即可。
如拷贝 https://github.com/tomasr/molokai/blob/master/colors/molokai.vim 到对应的文件夹便可以使用 molokai 主题了。
使用主题
1 | colorscheme molokai |