diff --git a/nvim/init.vim b/nvim/init.vim index bb3b6a7..b29b4c7 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -208,6 +208,7 @@ endif call plug#begin(data_dir . '/plugins') source ~/.config/nvim/plugins/base16-vim.vim +source ~/.config/nvim/plugins/fzf.vim call plug#end() doautocmd User PlugLoaded diff --git a/nvim/plugins/fzf.vim b/nvim/plugins/fzf.vim new file mode 100644 index 0000000..7093f38 --- /dev/null +++ b/nvim/plugins/fzf.vim @@ -0,0 +1,23 @@ +" A command-line fuzzy finder +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +Plug 'junegunn/fzf.vim' + +" Key bindings +let g:fzf_action = { + \ 'ctrl-t': 'tab split', + \ 'ctrl-x': 'split', + \ 'ctrl-v': 'vsplit' } + +" Popup window centered on the screen +let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } } + +" Enable per-command history +let g:fzf_history_dir = '~/.local/share/fzf-history' + +" Mappings +map :Files +map b :Buffers +nnoremap r :Rg +nnoremap gs :GFiles? +nnoremap t :Tags +nnoremap m :Marks