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 +++++++++++++++++++------------------------- plug-config/fzf.vim | 10 ++++----- plug-config/sneak.vim | 2 +- plug-config/start-screen.vim | 6 ++++++ 4 files changed, 33 insertions(+), 34 deletions(-) (limited to 'plug-config') 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 diff --git a/plug-config/fzf.vim b/plug-config/fzf.vim index 0e95a46f..c7ad00a2 100644 --- a/plug-config/fzf.vim +++ b/plug-config/fzf.vim @@ -10,11 +10,11 @@ let g:fzf_action = { " explicitly bind the keys to down and up in your $FZF_DEFAULT_OPTS. let g:fzf_history_dir = '~/.local/share/fzf-history' -map :Files -map b :Buffers -nnoremap g :Rg -nnoremap t :Tags -nnoremap m :Marks +" map :Files +" map b :Buffers +" nnoremap g :Rg +" nnoremap t :Tags +" nnoremap m :Marks let g:fzf_tags_command = 'ctags -R' diff --git a/plug-config/sneak.vim b/plug-config/sneak.vim index 29b57834..a879c6eb 100644 --- a/plug-config/sneak.vim +++ b/plug-config/sneak.vim @@ -15,7 +15,7 @@ highlight Sneak guifg=black guibg=#00C7DF ctermfg=black ctermbg=cyan highlight SneakScope guifg=red guibg=yellow ctermfg=red ctermbg=yellow " Cool prompt -let g:sneak#prompt = '🔎' +let g:sneak#prompt = '🔎 ' " I like quickscope better for this since it keeps me in the scope of a single line " map f Sneak_f diff --git a/plug-config/start-screen.vim b/plug-config/start-screen.vim index 8024fa16..2e926721 100644 --- a/plug-config/start-screen.vim +++ b/plug-config/start-screen.vim @@ -23,6 +23,12 @@ let g:startify_change_to_vcs_root = 1 let g:startify_fortune_use_unicode = 1 let g:startify_session_persistence = 1 +let g:webdevicons_enable_startify = 1 + +function! StartifyEntryFormat() + return 'WebDevIconsGetFileTypeSymbol(absolute_path) ." ". entry_path' + endfunction + let g:startify_bookmarks = [ \ { 'c': '~/.config/i3/config' }, \ { 'i': '~/.config/nvim/init.vim' }, -- cgit v1.2.3