From 75195765cac2f3628aecd52e7287920953383957 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 4 Nov 2019 21:59:43 +0100 Subject: [PATCH] Set fzf commands to actually use FZF --- .config/nvim/init.vim | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 88ba038..da4dfde 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -53,6 +53,7 @@ Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': 'NERDTreeToggle' } " show git status " Fuzzy matching Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' } +Plug 'junegunn/fzf.vim' Plug 'marty-oehme/notational-fzf-vim', { 'branch': 'origin/switch-fzf-to-skim' } Plug 'dyng/ctrlsf.vim' @@ -272,6 +273,7 @@ autocmd! User GoyoLeave nested call goyo_leave() " FZF Fuzzy Finding " set some fzf defaults let g:fzf_layout = { 'up': '~40%' } +let g:fzf_command_prefix = 'Fzf' let g:fzf_colors = \ { 'fg': ['fg', 'Normal'], \ 'bg': ['bg', 'Normal'], @@ -338,7 +340,6 @@ command! -bang -nargs=* CiteMarkdown call fzf#run(fzf#wrap({ \ 'up': '25%', \ 'options': '--ansi --multi --prompt "Markdown> "' \ })) - " map @@ to automatically insert citation reference at cursor inoremap @@ u:call fzf#run(fzf#wrap({ \ 'source': bibtex_ls(), @@ -611,15 +612,6 @@ au FileType go nnoremap :GoCoverageToggle -short " go to the definition of whatever you hover over au FileType go nnoremap (go-def) -" skim.vim (fzf alternative) fuzzy finding configuration -" extra key bindings in skim window -let g:skim_action = { - \ 'ctrl-t': 'tab split', - \ 'ctrl-h': 'split', - \ 'ctrl-v': 'vsplit' } - -command! -bang -nargs=* Rg call fzf#vim#rg_interactive(, fzf#vim#with_preview('right:50%:hidden', 'alt-h')) - " Configure notational-fzf-vim let g:nv_search_paths = [ g:wiki_root ] let g:nv_wrap_preview_text=1 @@ -657,21 +649,21 @@ nnoremap wf :execute(":call SearchWiki()") " FUZZY FINDING " FZF buffers and files in current workdir -noremap s :Buffers +noremap s :FzfBuffers " FZF most recently used / MRU, bound to S since it is essentially a larger " go-back intention than just buffers -noremap S :History -noremap f :Files +noremap S :FzfHistory +noremap f :FzfFiles " FZF general full-text search in cwd with rg -noremap :Rg +noremap :FzfRg " FZF note full-text search with notational-velocity like functions (in wiki " directory) noremap n :NV noremap N :NV! " FZF git diff -noremap gd :GFiles? +noremap gd :FzfGFiles? " insert a citation of a source using bib ref (uses academia library) nnoremap c :CiteRef