Castle

我的沉思、笔记和回忆

vim 的基本使用

技术

基本配置

set encoding=utf-8
set ruler
set number
set nowrap
set ci
set ts=4
set sw=4
syntax enable
set history=1000
set wildmenu
set expandtab
set helplang=cn
set sts=4
set showmatch
set hlsearch
filetype on
filetype plugin on
filetype indent on
set autowrite
set cursorline
set autoread
set scrolloff=2
set autoindent set backspace=indent,eol,start
colorscheme molokai
let g:molokai_original = 1
let g:rehash256 = 1
set guifont=Source\ Code\ Pro\ Regular:h16
set background=dark
if has("autocmd")
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
endif

主题

查看主题

执行以下命令(将 vim80 替换为自己的版本,可以到相应目录下 ls 一下即可)

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 主题了。

使用主题


colorscheme molokai
创建于2017年12月15日 13:50
阅读量 930
留言列表

暂时没有留言

添加留言