~gpanders/dotfiles

ref: 2da1dde5ea566f82ebe6532bc6d3b8670fd77ce8 dotfiles/vim/.vim/after/plugin/fzf.vim -rw-r--r-- 916 bytes
2da1dde5Greg Anders Note 'open' subcommand opens editor in NOTES_DIR when no argument given 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
" fzf configuration
" Author: Greg Anders <greg@gpanders.com>

" Check for local installation if not already loaded
if !get(g:, 'loaded_fzf') && isdirectory($HOME . '/.fzf')
  silent! source ~/.fzf/plugin/fzf.vim
endif

" If fzf is still not found, give up
if !get(g:, 'loaded_fzf')
  finish
endif

" Ctrl-P to start FZF
nnoremap <silent> <C-P> :FZF --layout=default<CR>

" Create Helptags command and map it to Ctrl-H
command! -bang Helptags call fzf#helptags(<bang>0)
nnoremap <silent> <C-H> :<C-U>Helptags<CR>

command! -bang -nargs=? Tag call fzf#tags(<bang>0, <q-args>, '')
command! -bang -nargs=? Ptag call fzf#tags(<bang>0, <q-args>, 'p')
nnoremap <Space>t :<C-U>Tag<CR>
nnoremap <C-W><Space>t :<C-U>call fzf#tags(0, '', 's')<CR>

" Hide statusline in FZF buffers
augroup plugin.fzf
    autocmd!
    autocmd FileType fzf set laststatus=0 noruler | autocmd BufLeave <buffer> set laststatus=2 ruler
augroup END