From 903249a59c3f4b91d45d8008eea7910014513a1c Mon Sep 17 00:00:00 2001 From: Serguey Parkhomovsky Date: Fri, 27 Mar 2026 23:43:29 -0700 Subject: more better: --- vim/.vimrc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'vim') diff --git a/vim/.vimrc b/vim/.vimrc index db580eb..a243424 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -112,19 +112,34 @@ nnoremap l let g:airline_theme = 'tokyonight' " ── FZF ─────────────────────────────────────────────────────────────────────── +" Use bash for fzf subprocesses — fish has non-interactive startup overhead +let $SHELL = '/bin/bash' + " Use ripgrep for :Files if available if executable('rg') set grepprg=rg\ --vimgrep\ --smart-case set grepformat=%f:%l:%c:%m endif +" Use fdfind as the default file lister — respects .gitignore, skips binaries +let $FZF_DEFAULT_COMMAND = 'fdfind --type f --hidden --follow --exclude .git' + +" Pass --bind change:top so fzf jumps to best match as you type (reduces lag) +let $FZF_DEFAULT_OPTS = '--bind=change:top' + " Layout let g:fzf_layout = { 'down': '40%' } let g:fzf_preview_window = ['right:50%:hidden', 'ctrl-/'] +" Faster Rg: no per-file headings, just stream line:col:content +command! -bang -nargs=* Rg + \ call fzf#vim#grep( + \ 'rg --column --line-number --no-heading --color=always --smart-case -- '.shellescape(), + \ fzf#vim#with_preview(), 0) + " FZF keymaps -nnoremap ff Files -nnoremap fb Buffers +nnoremap Files +nnoremap Buffers nnoremap rg Rg nnoremap fg GFiles nnoremap fl BLines -- cgit v1.2.3