Move vim plug prefs to dedicated files
This commit is contained in:
30
vim/.vim/prefs/fzf.vim
Normal file
30
vim/.vim/prefs/fzf.vim
Normal file
@ -0,0 +1,30 @@
|
||||
"nnoremap <silent> <C-p> :FZF -m<cr>
|
||||
"let $FZF_DEFAULT_COMMAND = 'ag -g ""'
|
||||
|
||||
" nmap <C-P> :FZF<CR>
|
||||
|
||||
nmap <leader><tab> <plug>(fzf-maps-n)
|
||||
xmap <leader><tab> <plug>(fzf-maps-x)
|
||||
omap <leader><tab> <plug>(fzf-maps-o)
|
||||
let g:fzf_preview_window = ['right:50%', 'ctrl-/']
|
||||
let g:fzf_history_dir = '~/.local/share/fzf-history'
|
||||
let g:fzf_command_prefix = 'Fzf'
|
||||
" use the same keybindings for fzf as in shell
|
||||
" nnoremap <silent> <c-s-t> :FzfHgFiles<CR>
|
||||
" nnoremap <silent> <c-s-f> :FzfHgRg<space>
|
||||
let s:hg_command = 'hg files 2>/dev/null'
|
||||
|
||||
command! -bang FzfHgFiles
|
||||
\ call fzf#run(fzf#wrap({
|
||||
\ 'source': s:hg_command,
|
||||
\ 'options': $FZF_DEFAULT_OPTS . " " . $FZF_CTRL_T_OPTS,
|
||||
\ }),
|
||||
\ <bang>0
|
||||
\ )
|
||||
command! -bang -nargs=* FzfHgRg
|
||||
\ call fzf#vim#grep(
|
||||
\ s:rg_command . " " . <q-args> . " " . "$(" . s:hg_command . ")", 1,
|
||||
\ <bang>0 ? fzf#vim#with_preview('up:60%')
|
||||
\ : fzf#vim#with_preview('right:50%'),
|
||||
\ <bang>0)
|
||||
|
Reference in New Issue
Block a user