Set fzf commands to actually use FZF
This commit is contained in:
parent
570c575776
commit
75195765ca
1 changed files with 7 additions and 15 deletions
|
@ -53,6 +53,7 @@ Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': 'NERDTreeToggle' } " show git status
|
||||||
|
|
||||||
" Fuzzy matching
|
" Fuzzy matching
|
||||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
|
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 'marty-oehme/notational-fzf-vim', { 'branch': 'origin/switch-fzf-to-skim' }
|
||||||
Plug 'dyng/ctrlsf.vim'
|
Plug 'dyng/ctrlsf.vim'
|
||||||
|
|
||||||
|
@ -272,6 +273,7 @@ autocmd! User GoyoLeave nested call <SID>goyo_leave()
|
||||||
" FZF Fuzzy Finding
|
" FZF Fuzzy Finding
|
||||||
" set some fzf defaults
|
" set some fzf defaults
|
||||||
let g:fzf_layout = { 'up': '~40%' }
|
let g:fzf_layout = { 'up': '~40%' }
|
||||||
|
let g:fzf_command_prefix = 'Fzf'
|
||||||
let g:fzf_colors =
|
let g:fzf_colors =
|
||||||
\ { 'fg': ['fg', 'Normal'],
|
\ { 'fg': ['fg', 'Normal'],
|
||||||
\ 'bg': ['bg', 'Normal'],
|
\ 'bg': ['bg', 'Normal'],
|
||||||
|
@ -338,7 +340,6 @@ command! -bang -nargs=* CiteMarkdown call fzf#run(fzf#wrap({
|
||||||
\ 'up': '25%',
|
\ 'up': '25%',
|
||||||
\ 'options': '--ansi --multi --prompt "Markdown> "'
|
\ 'options': '--ansi --multi --prompt "Markdown> "'
|
||||||
\ }))
|
\ }))
|
||||||
|
|
||||||
" map @@ to automatically insert citation reference at cursor
|
" map @@ to automatically insert citation reference at cursor
|
||||||
inoremap <silent> @@ <c-g>u<c-o>:call fzf#run(fzf#wrap({
|
inoremap <silent> @@ <c-g>u<c-o>:call fzf#run(fzf#wrap({
|
||||||
\ 'source': <sid>bibtex_ls(),
|
\ 'source': <sid>bibtex_ls(),
|
||||||
|
@ -611,15 +612,6 @@ au FileType go nnoremap <F9> :GoCoverageToggle -short<cr>
|
||||||
" go to the definition of whatever you hover over
|
" go to the definition of whatever you hover over
|
||||||
au FileType go nnoremap <F12> <Plug>(go-def)
|
au FileType go nnoremap <F12> <Plug>(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(<q-args>, fzf#vim#with_preview('right:50%:hidden', 'alt-h'))
|
|
||||||
|
|
||||||
" Configure notational-fzf-vim
|
" Configure notational-fzf-vim
|
||||||
let g:nv_search_paths = [ g:wiki_root ]
|
let g:nv_search_paths = [ g:wiki_root ]
|
||||||
let g:nv_wrap_preview_text=1
|
let g:nv_wrap_preview_text=1
|
||||||
|
@ -657,21 +649,21 @@ nnoremap <leader>wf :execute(":call SearchWiki()")<cr>
|
||||||
|
|
||||||
" FUZZY FINDING
|
" FUZZY FINDING
|
||||||
" FZF buffers and files in current workdir
|
" FZF buffers and files in current workdir
|
||||||
noremap <leader>s :Buffers<cr>
|
noremap <leader>s :FzfBuffers<cr>
|
||||||
" FZF most recently used / MRU, bound to S since it is essentially a larger
|
" FZF most recently used / MRU, bound to S since it is essentially a larger
|
||||||
" go-back intention than just buffers
|
" go-back intention than just buffers
|
||||||
noremap <leader>S :History<cr>
|
noremap <leader>S :FzfHistory<cr>
|
||||||
noremap <leader>f :Files<cr>
|
noremap <leader>f :FzfFiles<cr>
|
||||||
|
|
||||||
" FZF general full-text search in cwd with rg
|
" FZF general full-text search in cwd with rg
|
||||||
noremap <C-F> :Rg<cr>
|
noremap <C-F> :FzfRg<cr>
|
||||||
" FZF note full-text search with notational-velocity like functions (in wiki
|
" FZF note full-text search with notational-velocity like functions (in wiki
|
||||||
" directory)
|
" directory)
|
||||||
noremap <leader>n :NV<cr>
|
noremap <leader>n :NV<cr>
|
||||||
noremap <leader>N :NV!<cr>
|
noremap <leader>N :NV!<cr>
|
||||||
|
|
||||||
" FZF git diff
|
" FZF git diff
|
||||||
noremap <leader>gd :GFiles?<cr>
|
noremap <leader>gd :FzfGFiles?<cr>
|
||||||
|
|
||||||
" insert a citation of a source using bib ref (uses academia library)
|
" insert a citation of a source using bib ref (uses academia library)
|
||||||
nnoremap <leader>c :CiteRef<cr>
|
nnoremap <leader>c :CiteRef<cr>
|
||||||
|
|
Loading…
Reference in a new issue