From f491cba67223affa6fcbdf701d62c50afd994459 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 10 May 2020 13:29:31 -0400 Subject: which key basics --- plug-config/coc.vim | 49 +++++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) (limited to 'plug-config/coc.vim') diff --git a/plug-config/coc.vim b/plug-config/coc.vim index babae7ed..428230d1 100644 --- a/plug-config/coc.vim +++ b/plug-config/coc.vim @@ -22,10 +22,6 @@ else imap pumvisible() ? "\" : "\u\" endif -" Use `[g` and `]g` to navigate diagnostics -nmap [g (coc-diagnostic-prev) -nmap ]g (coc-diagnostic-next) - " GoTo code navigation. nmap gd (coc-definition) nmap gy (coc-type-definition) @@ -49,10 +45,6 @@ autocmd CursorHold * silent call CocActionAsync('highlight') " Symbol renaming. nmap rn (coc-rename) -" Formatting selected code. -xmap f (coc-format-selected) -nmap f (coc-format-selected) - augroup mygroup autocmd! " Setup formatexpr specified filetype(s). @@ -63,13 +55,13 @@ augroup end " Applying codeAction to the selected region. " Example: `aap` for current paragraph -xmap a (coc-codeaction-selected) -nmap a (coc-codeaction-selected) +" xmap a (coc-codeaction-selected) +" nmap a (coc-codeaction-selected) " Remap keys for applying codeAction to the current line. -nmap ac (coc-codeaction) +" nmap ac (coc-codeaction) " Apply AutoFix to problem on the current line. -nmap qf (coc-fix-current) +" nmap qf (coc-fix-current) " Introduce function text object " NOTE: Requires 'textDocument.documentSymbol' support from the language server. @@ -100,21 +92,22 @@ set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} " Mappings using CoCList: " Show all diagnostics. -nnoremap a :CocList diagnostics -" Manage extensions. -nnoremap e :CocList extensions -" Show commands. -nnoremap c :CocList commands -" Find symbol of current document. -nnoremap o :CocList outline -" Search workspace symbols. -nnoremap s :CocList -I symbols -" Do default action for next item. -nnoremap j :CocNext -" Do default action for previous item. -nnoremap k :CocPrev -" Resume latest coc list. -nnoremap p :CocListResume +" TODO add these to which key +" nnoremap a :CocList diagnostics +" " Manage extensions. +" nnoremap e :CocList extensions +" " Show commands. +" nnoremap c :CocList commands +" " Find symbol of current document. +" nnoremap o :CocList outline +" " Search workspace symbols. +" nnoremap s :CocList -I symbols +" " Do default action for next item. +" nnoremap j :CocNext +" " Do default action for previous item. +" nnoremap k :CocPrev +" " Resume latest coc list. +" nnoremap p :CocListResume " Explorer let g:coc_explorer_global_presets = { @@ -137,5 +130,5 @@ let g:coc_explorer_global_presets = { \ } "nmap e :CocCommand explorer nnoremap e :CocCommand explorer -nmap f :CocCommand explorer --preset floatingRightside +" nmap f :CocCommand explorer --preset floatingRightside autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'coc-explorer') | q | endif -- cgit v1.2.3