vim: add keywordprg config, override K

hit K to run a ripgrep search on the word under the cursor.
This leverages fzf.vim
pull/6/head
bretello 2022-01-25 10:52:22 +01:00
parent 43426f7ac5
commit c231afe36e
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
2 changed files with 3 additions and 0 deletions

View File

@ -155,3 +155,5 @@ let @b = 'obreakpoint(
vnoremap <silent> <leader>k :call VisualSelection('LAck', '')<CR>
vnoremap <silent> <leader>gs :call GitShowVisual()<CR>
vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
nnoremap K :exe "Rg " . expand("<cword>")<cr>

View File

@ -60,6 +60,7 @@ autocmd FileType vue setlocal shiftwidth=2 softtabstop=2 expandtab
autocmd FileType go setlocal noexpandtab makeprg=go\ build
autocmd FileType rust set makeprg=cargo\ build
autocmd FileType python set keywordprg="pydoc"
syntax match jsonComment "//.*"
syntax match jsonComment "\(/\*\)\|\(\*/\)"