6
if !exists('g:syntax_on')
source link: https://pastebin.com/Nz1pbsSD
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Advertisement
Untitled
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if !exists('g:syntax_on')
- 1 syntax on
- 2 endif
- 3 filetype plugin indent on
- 4 set ts=2 sts=2 sw=2 et ai si
- 5 set rnu
- 7 call plug#begin()
- 9 Plug 'neoclide/coc.nvim'
- 10 Plug 'jiangmiao/auto-pairs'
- 11 Plug 'gruvbox-community/gruvbox'
- 12 Plug 'vim-airline/vim-airline'
- 13 Plug 'vim-airline/vim-airline-themes'
- 14 Plug 'preservim/nerdtree'
- 16 call plug#end()
- 18 function! CheckBackspace() abort
- 19 let col = col('.') - 1
- 20 return !col || getline('.')[col - 1] =~# '\s'
- 21 endfunction
- 23 inoremap <expr> <cr> coc#pum#visible() ? coc#_select_confirm() : "\<CR>"
- 25 inoremap <silent><expr> <Tab>
- 26 \ coc#pum#visible() ? coc#pum#next(1) :
- 27 \ CheckBackspace() ? "\<Tab>" :
- 28 \ coc#refresh()
- 30 set termguicolors
- 31 colo gruvbox
- 34 inoremap <c-b> <Esc>:NERDTreeToggle<cr>
- 35 nnoremap <c-b> <Esc>:NERDTreeToggle<cr>
- 37 nmap <silent> [c <Plug>(coc-diagnostic-prev)
- 38 nmap <silent> ]c <Plug>(coc-diagnostic-next)
- 39 nmap <silent> [d <Plug>(coc-diagnostic-prev-error)
- 40 nmap <silent> ]d <Plug>(coc-diagnostic-next-error)
- 41 nmap <silent> [e :call CocAction('diagnosticList')<CR>
- 42 nmap <silent> [f <plug>(coc-diagnostics)
- 44 nmap <silent> gd <Plug>(coc-definition)
- 45 nmap <silent> gy <Plug>(coc-type-definition)
- 46 nmap <silent> gi <Plug>(coc-implementation)
- 47 nmap <silent> gr <Plug>(coc-references)
- 49 nmap <F2> <Plug>(coc-rename)
- 51 nnoremap <silent> <F3> :call <SID>show_documentation()<CR>
- 53 function! s:show_documentation()
- 54 if (index(['vim','help'], &filetype) >= 0)
- 55 execute 'h '.expand('<cword>')
- 56 else
- 57 call CocAction('doHover')
- 58 endif
- 59 endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK