Created
February 11, 2019 09:21
-
-
Save haanamomo/5cd7d51777944f2abcd2de36fb1a4e66 to your computer and use it in GitHub Desktop.
vim配置
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
" install fzf using homebrew | |
set rtp+=/usr/local/opt/fzf | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
" 文件列表 | |
Plugin 'scrooloose/nerdtree' | |
map <F2> :NERDTreeToggle<CR> " 绑定F2作为显示和隐藏NERDTree的快捷键 | |
" autocmd vimenter * NERDTree " 打开文件时自动打开NERDTree | |
" 关闭vim时, 如果打开的文件除了NERDTree没有其他文件, 则自动关闭 | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") &&b:NERDTreeType == "primary") | q | endif | |
" 自动补全 | |
Plugin 'shougo/neocomplcache.vim' | |
" 显示状态 | |
Plugin 'Lokaltog/vim-powerline' | |
" 颜色主题 | |
Plugin 'sickill/vim-monokai' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" 设置颜色主题 | |
colorscheme monokai | |
" 设置语法高亮 | |
syntax enable | |
" 设置文件类型检测 | |
syntax on | |
" 设置显示行数 | |
set nu | |
" Brief help | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment