diff options
author | Matthew Lemon <y@yulqen.org> | 2023-06-01 16:04:10 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-06-01 16:04:10 +0100 |
commit | f8058d6ac1b9e676b4a4c777ab3b9c3bb4096b71 (patch) | |
tree | 61d99fc09bd0f1ecdbcff43678ed4ccf746ca9d1 /vim | |
parent | 6864071ef37f1d0dbabe4d2be07cdf49081e9000 (diff) |
Adding back fzf
Diffstat (limited to 'vim')
-rw-r--r-- | vim/vimrc | 49 |
1 files changed, 47 insertions, 2 deletions
@@ -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 <C-s> :GFiles!<CR> + nnoremap <leader><C-p> :<C-u>FZF!<CR> + nnoremap <leader>t :Files<CR> + nnoremap <leader>o :Tags<CR> + nnoremap <leader>h :History<CR> + nnoremap <silent> <leader>0 :Files<CR> + nnoremap <silent> <leader>; :BLines<CR> + nnoremap <silent> <leader>l :Lines<CR> + nnoremap <silent> <leader>o :BTags<CR> + nnoremap <silent> <leader>b :Buffers<CR> + nnoremap <silent> <leader>? :History:<CR> + nnoremap <silent> <leader>/ :execute 'Ag ' . input('Ag/')<CR> + nnoremap <silent> <leader>ft :Filetypes<CR> + nnoremap <silent> <leader>CC :Commands<CR> + imap <C-x><C-f> <plug>(fzf-complete-file-ag) + imap <C-x><C-l> <plug>(fzf-complete-line) |