From f8058d6ac1b9e676b4a4c777ab3b9c3bb4096b71 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 1 Jun 2023 16:04:10 +0100 Subject: Adding back fzf --- vim/vimrc | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 148d91a..deeac6e 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -83,8 +83,8 @@ endif call plug#begin() "Plug 'vim-scripts/AutoComplPop' -" Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } -" Plug 'junegunn/fzf.vim' +Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } +Plug 'junegunn/fzf.vim' Plug 'lambdalisue/fern.vim' Plug 'junegunn/goyo.vim' Plug 'sheerun/vim-polyglot' @@ -117,3 +117,48 @@ runtime macros/matchit.vim "allows jumping between brackets with % in normal mod " remap :W to :w - :W was previous Windows in fzf command! W w + +" FZF +" This is the default extra key bindings +let g:fzf_action = { + \ 'ctrl-t': 'tab split', + \ 'ctrl-x': 'split', + \ 'ctrl-v': 'vsplit' } + +" - FZF Popup window (center of the screen) +let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } + +" Customize fzf colors to match your color scheme +let g:fzf_colors = +\ { 'fg': ['fg', '#f8f8f2'], + \ 'bg': ['bg', '#282a36'], + \ 'hl': ['fg', '#bd93f9'], + \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], + \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], + \ 'hl+': ['fg', 'Statement'], + \ 'info': ['fg', '#ffb86c'], + \ 'prompt': ['fg', '#50fa7b'], + \ 'pointer': ['fg', 'Exception'], + \ 'marker': ['fg', 'Keyword'], + \ 'spinner': ['fg', '#ffb86c'], + \ 'header': ['fg', '#6272a4'] } +" More fzf settings +" (https://github.com/zenbro/dotfiles/blob/master/.nvimrc#L151-L187) + let g:fzf_nvim_statusline = 0 " disable statusline overwriting + + nnoremap :GFiles! + nnoremap :FZF! + nnoremap t :Files + nnoremap o :Tags + nnoremap h :History + nnoremap 0 :Files + nnoremap ; :BLines + nnoremap l :Lines + nnoremap o :BTags + nnoremap b :Buffers + nnoremap ? :History: + nnoremap / :execute 'Ag ' . input('Ag/') + nnoremap ft :Filetypes + nnoremap CC :Commands + imap (fzf-complete-file-ag) + imap (fzf-complete-line) -- cgit v1.2.3