Change vim bindings
This commit is contained in:
parent
2fa2c74dcb
commit
793767f12e
1 changed files with 8 additions and 6 deletions
|
@ -100,8 +100,8 @@ inoremap <silent><expr> <c-space> coc#refresh()
|
|||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
|
||||
" Use `[g` and `]g` to navigate diagnostics
|
||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
||||
nmap <silent> gp <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> gn <Plug>(coc-diagnostic-next)
|
||||
|
||||
" Remap keys for gotos
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
|
@ -120,8 +120,10 @@ function! s:show_documentation()
|
|||
endif
|
||||
endfunction
|
||||
|
||||
nmap <silent> <space>i :call <SID>show_documentation()<CR>
|
||||
|
||||
" Highlight symbol under cursor on CursorHold
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
"autocmd CursorHold * silent call CocActionAsync('doHover')
|
||||
|
||||
" Remap for rename current word
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
|
@ -143,9 +145,9 @@ xmap <leader>a <Plug>(coc-codeaction-selected)
|
|||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
|
||||
" Remap for do codeAction of current line
|
||||
nmap <leader>ac <Plug>(coc-codeaction)
|
||||
nmap <space>a <Plug>(coc-codeaction)
|
||||
" Fix autofix problem of current line
|
||||
nmap <leader>qf <Plug>(coc-fix-current)
|
||||
nmap <space>f <Plug>(coc-fix-current)
|
||||
|
||||
" Create mappings for function text object, requires document symbols feature of languageserver.
|
||||
|
||||
|
@ -173,7 +175,7 @@ set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
|
|||
|
||||
" Using CocList
|
||||
" Show all diagnostics
|
||||
nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr>
|
||||
nnoremap <silent> <space>d :<C-u>CocList diagnostics<cr>
|
||||
" Manage extensions
|
||||
nnoremap <silent> <space>e :<C-u>CocList extensions<cr>
|
||||
" Show commands
|
||||
|
|
Loading…
Reference in a new issue