Leader-f to fuzzy search word under cursor

`<leader>-f` to open FZF window with word under cursor pre-populated
This commit is contained in:
2024-04-23 19:20:05 -04:00
parent 0fa0c06df9
commit 91e5cd5405

2
.vimrc
View File

@@ -250,6 +250,8 @@ map <esc>x <c-w>q
map <leader><leader> :Files<CR>
" <leader>g to open FZF Git files
map <leader>g :GFiles<CR>
" Map <leader>f to open FZF with word under cursor pre-populated
nnoremap <leader>f :call fzf#run(fzf#vim#with_preview(fzf#wrap({'source': 'find . \( -name .git -o -name .stversions \) -prune -o -print -iname "*'.expand("<cword>").'*"', 'sink': 'e', 'options': '--query="'.expand("<cword>").'"'})))<CR>
" ---------------------------------------------------------------------------------------------------------------------
" ==> Keymaps: Text bubbling (http://vimcasts.org/episodes/bubbling-text/)