From d57fbf0e66139de10014378f93b7071bf6f09352 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 3 Sep 2025 13:13:07 +0200 Subject: [PATCH] vim:keys: Prepend fzf bindings with `f` All fzf related bindings should start with `f`. This resolves the clash between `GFiles` and the git actions targeting the full file. --- .config/vim/vimrc.d/40-keys.vim | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index f5ee752..29154b2 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -91,24 +91,19 @@ elseif (has('terminal')) nmap terminal endif -" Plugin specific bindings if (get(g:, 'loaded_fzf')) - nmap f Files - nmap j Lines - nmap / Lines - nmap h Helptags - " TODO: fix this? - if (get(g:, 'loaded_gutentags') || 1) - nmap t Tags - nmap bt BTags - endif - + nmap ff Files + nmap fj Lines + nmap f/ Lines + nmap fh Helptags + nmap ft Tags + nmap fbt BTags " git files that `git status` lists - nmap gf GFiles? + nmap fgf GFiles? " 'git log (log?)' and 'git log buffer ' - map gll Commits - map glb BCommits - " TODO: glb should restrict the log to all staged files when called + map fgll Commits + map fglb BCommits + " TODO: fglb should restrict the log to all staged files when called " in .git/COMMIT_EDITMSG, maybe with an ftplugin? endif @@ -161,10 +156,9 @@ nmap grc :let subject=system('git show -s --date=short --pretty="format: nmap gso :r!git config --get user.name:r!git config --get user.emailI<A>kJISigned-off-by: " Add, stash or checkout the current file -" TODO: Conflict with gf -"nmap gfa !git add -- % -"nmap gfs !git stash -- % -"nmap gfu !git checkout -- % +nmap gfa !git add -- % +nmap gfs !git stash -- % +nmap gfu !git checkout -- % if exists('g:loaded_fugitive') " Interactive `git status`