summaryrefslogtreecommitdiff
path: root/.config/nvim/other/fzf.vim
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/other/fzf.vim')
-rw-r--r--.config/nvim/other/fzf.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/.config/nvim/other/fzf.vim b/.config/nvim/other/fzf.vim
new file mode 100644
index 0000000..32cb18b
--- /dev/null
+++ b/.config/nvim/other/fzf.vim
@@ -0,0 +1,19 @@
+" --> Fzf
+let g:fzf_layout = { 'window': { 'width': 1, 'height': 1 } }
+command! -bang -nargs=? -complete=dir Files
+ \ call fzf#vim#files(<q-args>, {'options': ['--info=inline', '--preview', 'preview {}']}, <bang>0)
+
+" Mapping selecting mappings
+nmap <leader><tab> <plug>(fzf-maps-n)
+xmap <leader><tab> <plug>(fzf-maps-x)
+omap <leader><tab> <plug>(fzf-maps-o)
+
+" Insert mode completion
+imap <c-x><c-k> <plug>(fzf-complete-word)
+imap <c-x><c-f> <plug>(fzf-complete-path)
+imap <c-x><c-l> <plug>(fzf-complete-line)
+
+" Fzf keybindings
+nnoremap <leader>ff :Files<CR>
+nnoremap <leader>. :Files %:p:h<CR>
+