Explorar o código

added coc word search

Chris %!s(int64=5) %!d(string=hai) anos
pai
achega
bfa321c1bd
Modificáronse 2 ficheiros con 7 adicións e 5 borrados
  1. 4 5
      general/functions.vim
  2. 3 0
      keys/which-key.vim

+ 4 - 5
general/functions.vim

@@ -5,15 +5,14 @@ augroup auto_spellcheck
   autocmd BufNewFile,BufRead *.md setlocal spell
 augroup END
 
-function! OpenLiveServer()
- echo 'live server is on'
- silent !live-server % &
-endfunction
+" function! OpenLiveServer()
+"  echo 'live server is on'
+"  silent !live-server % &
+" endfunction
 
 command Serve :call OpenLiveServer()
 nnoremap <silent>bs :call OpenLiveServer()<CR>
 
-" Remove trailing whitespaces automatically before save
 " augroup strip_ws
 "   autocmd BufWritePre * call utils#stripTrailingWhitespaces()
 " augroup END

+ 3 - 0
keys/which-key.vim

@@ -10,6 +10,9 @@ let g:which_key_map =  {}
 let g:which_key_sep = '→'
 " set timeoutlen=100
 
+" Coc Search & refactor
+nnoremap <leader>? :CocSearch <C-R>=expand("<cword>")<CR><CR>
+let g:which_key_map['?'] = 'search word'
 
 " Not a fan of floating windows for this
 let g:which_key_use_floating_win = 0