diff --git a/vim/.vimrc b/vim/.vimrc index 41798da..fc68ad9 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -170,9 +170,15 @@ endif " If fzf is available use its built-in Vim plugin for file navigation if executable("fzf") - set rtp+=/opt/homebrew/opt/fzf - set rtp+=~/.fzf - nnoremap f :FZF + set rtp+=/opt/homebrew/opt/fzf " for macOS and fzf installed via brew + set rtp+=/usr/share/doc/fzf/examples " for Debian and fzf installed via apt + " NOTE(kirillmorozov): fzf.vim might not exist in the runtimepath so I + " explicitly read Ex commands from the plugin and check FZF command + " existence before adding a key map. + runtime plugin/fzf.vim + if exists(':FZF') == 2 + nnoremap f :FZF + endif endif " Set up Git TUI client