From b66bce91175fa0feb27ac9e045769eb3c7ec1ca2 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 14 Feb 2018 01:37:48 -0500 Subject: switch to the fzf vim plugin --- vimrc | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 0f3e678..88f9d16 100644 --- a/vimrc +++ b/vimrc @@ -70,24 +70,18 @@ let g:ale_history_log_output = 0 " commentary {{{ map x :Commentary " }}} -" denite {{{ -autocmd vimrc VimEnter * call denite#custom#map('insert', '', '') -autocmd vimrc VimEnter * call denite#custom#map('insert', '', '') -autocmd vimrc VimEnter * call denite#custom#source('line', 'sorters', []) -if executable('ag') - autocmd vimrc VimEnter * call denite#custom#var('file_rec', 'command', ['ag', '--hidden', '-l', '.']) - autocmd vimrc VimEnter * call denite#custom#var('grep', 'command', ['ag']) - autocmd vimrc VimEnter * call denite#custom#var('grep', 'default_opts', ['--hidden']) - autocmd vimrc VimEnter * call denite#custom#var('grep', 'recursive_opts', []) - autocmd vimrc VimEnter * call denite#custom#var('grep', 'pattern_opt', []) - autocmd vimrc VimEnter * call denite#custom#var('grep', 'separator', []) -endif -nnoremap t :Denite -direction=dynamictop buffer file_rec -nnoremap b :Denite -direction=dynamictop buffer -nnoremap ff :Denite -direction=dynamictop grep:.::! -nnoremap fh :Denite -direction=dynamictop help -nnoremap ft :Denite -direction=dynamictop filetype -nnoremap f/ :Denite -direction=dynamictop line +" fzf {{{ +let g:fzf_layout = { 'up': '~40%' } +command! -bang -nargs=* Ag + \ call fzf#vim#ag(, + \ "--hidden", + \ 0 ? fzf#vim#with_preview('up:60%') + \ : fzf#vim#with_preview('right:50%', '?'), + \ 0) +nnoremap t :Files +nnoremap ff :Ag +nnoremap fh :Helptags +nnoremap ft :Filetypes " }}} " gundo {{{ if has("python") @@ -141,9 +135,9 @@ let g:rainbow_brace = 1 let g:startify_list_order = ['dir', 'bookmarks', 'commands'] let g:startify_files_number = 7 let g:startify_commands = [ - \ {'t': ['Open file', 'Denite -direction=dynamictop buffer file_rec']}, - \ {'ff': ['Grep', 'Denite -direction=dynamictop grep:.::!']}, - \ {'fh': ['Help', 'Denite -direction=dynamictop help']}, + \ {'t': ['Open file', 'Files']}, + \ {'ff': ['Grep', 'Ag']}, + \ {'fh': ['Help', 'Helptags']}, \ ] let g:startify_change_to_vcs_root = 1 let g:startify_custom_indices = [ -- cgit v1.2.3-54-g00ecf