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 --- .gitmodules | 9 ++++++--- vim/pack/plugins/start/denite | 1 - vim/pack/plugins/start/fzf | 1 + vim/pack/plugins/start/fzf.vim | 1 + vimrc | 36 +++++++++++++++--------------------- 5 files changed, 23 insertions(+), 25 deletions(-) delete mode 160000 vim/pack/plugins/start/denite create mode 160000 vim/pack/plugins/start/fzf create mode 160000 vim/pack/plugins/start/fzf.vim diff --git a/.gitmodules b/.gitmodules index 144a519..3fee8d6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -67,9 +67,6 @@ [submodule "vim/bundle/ledger"] path = vim/pack/filetype/start/ledger url = git://github.com/ledger/vim-ledger -[submodule "vim/pack/local/start/denite"] - path = vim/pack/plugins/start/denite - url = git://github.com/Shougo/denite.nvim [submodule "vim/pack/local/start/ale"] path = vim/pack/plugins/start/ale url = git://github.com/w0rp/ale @@ -91,3 +88,9 @@ [submodule "zsh/fzf"] path = sh/fzf url = git://github.com/junegunn/fzf +[submodule "vim/pack/plugins/start/fzf.vim"] + path = vim/pack/plugins/start/fzf.vim + url = git://github.com/junegunn/fzf.vim +[submodule "vim/pack/plugins/start/fzf"] + path = vim/pack/plugins/start/fzf + url = git://github.com/junegunn/fzf diff --git a/vim/pack/plugins/start/denite b/vim/pack/plugins/start/denite deleted file mode 160000 index 5711840..0000000 --- a/vim/pack/plugins/start/denite +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 57118402ea4e0d23ae8990fc5424428e165515e1 diff --git a/vim/pack/plugins/start/fzf b/vim/pack/plugins/start/fzf new file mode 160000 index 0000000..eb3afc0 --- /dev/null +++ b/vim/pack/plugins/start/fzf @@ -0,0 +1 @@ +Subproject commit eb3afc03b57a20d1062880efe8e000abceeba3ee diff --git a/vim/pack/plugins/start/fzf.vim b/vim/pack/plugins/start/fzf.vim new file mode 160000 index 0000000..17d24ae --- /dev/null +++ b/vim/pack/plugins/start/fzf.vim @@ -0,0 +1 @@ +Subproject commit 17d24ae31d119f8bdd88a5149a831ca35baf726c 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