下载 Vundle
复制 Vundle 的 GitHub 仓库地址:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
"vim 配置
syntax on
set cursorline
set hlsearch
set nu
"输入的命令显示出来
set showcmd
"光标控制"
set mouse=a
"文件修改之后自动载入
set autoread
" 随着键入即时搜索
set incsearch
"set showmatch
"set ruler
set clipboard=unnamed
set guioptions-=T
nmap <Leader>q :q<CR>
nmap <Leader>Q :qa!<CR>
" 启用vundle来管理vim插件
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"安装插件写在这之后
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'suan/vim-instant-markdown'
Plugin 'vim-syntastic/syntastic'
Plugin 'bling/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
"代码片段
"Plugin 'honza/vim-snippets'
Plugin 'johngrib/vim-game-code-break'
Plugin 'neovim/neovim'
"Plugin 'vim-scripts/bash-support.vim'
Plugin 'Lokaltog/powerline'
Plugin 'Color-Sampler-Pack'
Plugin 'txt.vim'
Plugin 'mru.vim'
Plugin 'tpope/vim-surround.git'
Plugin 'DoxygenToolkit.vim'
Plugin 'tczengming/headerGatesAdd.vim'
Plugin 'godlygeek/tabular'
Plugin 'mzlogin/vim-markdown-toc'
"必要插件,安装在vim-markdown前面
"Plugin 'plasticboy/vim-markdown'
Plugin 'iamcco/markdown-preview.nvim'
"Plugin '907th/vim-auto-save'
"Plugin 'maralla/completor.vim'
"Plugin 'Valloric/YouCompleteMe'
"Plugin 'Lokaltog/vim-powerline'
"安装插件写在这之前
call vundle#end()
filetype plugin on
"常用命令
":PluginList - 查看已经安装的插件
":PluginInstall - 安装插件
":PluginUpdate - 更新插件
":PluginSearch - 搜索插件,例如 :PluginSearch xml就能搜到xml相关的插件
":PluginClean - 删除插件,把安装插件对应行删除,然后执行这个命令即可
map <C-n> :NERDTreeToggle<CR>
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_loc_list_height = 4
let g:autoformat_autoindent = 1
let g:autoformat_retab = 0
let g:autoformat_remove_trailing_spaces = 0
set guifont=Inconsolata\ for\ Powerline:h15
let g:Powerline_symbols = 'fancy'
set encoding=utf-8
set t_Co=256
set fillchars+=stl:\ ,stlnc:\
set term=xterm-256color
set termencoding=utf-8
set rtp+=/usr/local/opt/fzf
let g:vim_markdown_math = 3
"enable AutoSave on Vim startup
let g:auto_save = 1