" vim的插件网站 https://vimawesome.com/ set background=dark " 搜索和替换 set ignorecase smartcase " 高亮搜索 set hlsearch " 语法高亮 syntax on " 1tab == 4 spaces set shiftwidth=4 set tabstop=4 set autoindent " 自动索引 set smartindent " 设置编码 set encoding=UTF-8 set backspace=2 " 切换窗口 noremap <C-h> <C-w>h noremap <C-j> <C-w>j noremap <C-k> <C-w>k noremap <C-l> <C-w>l call plug#begin('~/.vim/plugged') " vim 的状态行插件 Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' " vim 的开屏插件 Plug 'mhinz/vim-startify' " vim 的图标插件 Plug 'ryanoasis/vim-devicons' " 主题 " Plug 'arcticicestudio/nord-vim' Plug 'morhetz/gruvbox' " 搜索 Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } nnoremap <silent> <C-f> :Files<CR> Plug 'scrooloose/nerdtree' Plug 'Xuyuanp/nerdtree-git-plugin' Plug 'tiagofumo/vim-nerdtree-syntax-highlight' Plug 'neoclide/coc.nvim', { 'do': 'yarn install --frozen-lockfile' } call plug#end() " Nerdtree config autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif " 打开文件自动打开 autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif " 关闭文件自动关闭 map <C-n> :NERDTreeToggle<CR> let NERDTreeMinimalUI = 1 let NERDTreeShowHidden = 1 let g:NERDTreeGitStatusIndicatorMapCustom = { \ "Modified" : "✹", \ "Staged" : "✚", \ "Untracked" : "✭", \ "Renamed" : "➜", \ "Unmerged" : "═", \ "Deleted" : "✖", \ "Dirty" : "✗", \ "Clean" : "✔︎", \ 'Ignored' : '☒', \ "Unknown" : "?" \ } colorscheme gruvbox
 
badge