diff options
author | Chris <[email protected]> | 2020-05-10 13:29:31 -0400 |
---|---|---|
committer | Chris <[email protected]> | 2020-05-10 13:29:31 -0400 |
commit | f491cba67223affa6fcbdf701d62c50afd994459 (patch) | |
tree | 58caaaff26187b00349a1a54559342eb6466de0c /plug-config | |
parent | 481d63b57e524553e6cb2624288afb160e359db7 (diff) |
which key basics
Diffstat (limited to 'plug-config')
-rw-r--r-- | plug-config/coc.vim | 49 | ||||
-rw-r--r-- | plug-config/fzf.vim | 10 | ||||
-rw-r--r-- | plug-config/sneak.vim | 2 | ||||
-rw-r--r-- | plug-config/start-screen.vim | 6 |
4 files changed, 33 insertions, 34 deletions
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 <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>" endif -" Use `[g` and `]g` to navigate diagnostics -nmap <silent> [g <Plug>(coc-diagnostic-prev) -nmap <silent> ]g <Plug>(coc-diagnostic-next) - " GoTo code navigation. nmap <silent> gd <Plug>(coc-definition) nmap <silent> gy <Plug>(coc-type-definition) @@ -49,10 +45,6 @@ autocmd CursorHold * silent call CocActionAsync('highlight') " Symbol renaming. nmap <leader>rn <Plug>(coc-rename) -" Formatting selected code. -xmap <leader>f <Plug>(coc-format-selected) -nmap <leader>f <Plug>(coc-format-selected) - augroup mygroup autocmd! " Setup formatexpr specified filetype(s). @@ -63,13 +55,13 @@ augroup end " Applying codeAction to the selected region. " Example: `<leader>aap` for current paragraph -xmap <leader>a <Plug>(coc-codeaction-selected) -nmap <leader>a <Plug>(coc-codeaction-selected) +" xmap <leader>a <Plug>(coc-codeaction-selected) +" nmap <leader>a <Plug>(coc-codeaction-selected) " Remap keys for applying codeAction to the current line. -nmap <leader>ac <Plug>(coc-codeaction) +" nmap <leader>ac <Plug>(coc-codeaction) " Apply AutoFix to problem on the current line. -nmap <leader>qf <Plug>(coc-fix-current) +" nmap <leader>qf <Plug>(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 <silent> <space>a :<C-u>CocList diagnostics<cr> -" Manage extensions. -nnoremap <silent> <space>e :<C-u>CocList extensions<cr> -" Show commands. -nnoremap <silent> <space>c :<C-u>CocList commands<cr> -" Find symbol of current document. -nnoremap <silent> <space>o :<C-u>CocList outline<cr> -" Search workspace symbols. -nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr> -" Do default action for next item. -nnoremap <silent> <space>j :<C-u>CocNext<CR> -" Do default action for previous item. -nnoremap <silent> <space>k :<C-u>CocPrev<CR> -" Resume latest coc list. -nnoremap <silent> <space>p :<C-u>CocListResume<CR> +" TODO add these to which key +" nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr> +" " Manage extensions. +" nnoremap <silent> <space>e :<C-u>CocList extensions<cr> +" " Show commands. +" nnoremap <silent> <space>c :<C-u>CocList commands<cr> +" " Find symbol of current document. +" nnoremap <silent> <space>o :<C-u>CocList outline<cr> +" " Search workspace symbols. +" nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr> +" " Do default action for next item. +" nnoremap <silent> <space>j :<C-u>CocNext<CR> +" " Do default action for previous item. +" nnoremap <silent> <space>k :<C-u>CocPrev<CR> +" " Resume latest coc list. +" nnoremap <silent> <space>p :<C-u>CocListResume<CR> " Explorer let g:coc_explorer_global_presets = { @@ -137,5 +130,5 @@ let g:coc_explorer_global_presets = { \ } "nmap <silent> <space>e :CocCommand explorer<CR> nnoremap <silent> <leader>e :CocCommand explorer<CR> -nmap <space>f :CocCommand explorer --preset floatingRightside<CR> +" nmap <space>f :CocCommand explorer --preset floatingRightside<CR> 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 <C-f> :Files<CR> -map <leader>b :Buffers<CR> -nnoremap <leader>g :Rg<CR> -nnoremap <leader>t :Tags<CR> -nnoremap <leader>m :Marks<CR> +" map <C-f> :Files<CR> +" map <leader>b :Buffers<CR> +" nnoremap <leader>g :Rg<CR> +" nnoremap <leader>t :Tags<CR> +" nnoremap <leader>m :Marks<CR> 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 <Plug>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' }, |