summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2024-01-20 16:42:37 +0100
committerLinnnus <[email protected]>2024-01-21 15:57:38 +0100
commit0915c9642e3db06c16bce3e68668c78514ac60ef (patch)
tree2b10c7d6b19870c985930630e1336fc4213dd1bb
parent9361a4df56190562440a59174a1193754fe1a58e (diff)
home/neovim: Add double space FZF mapping
-rw-r--r--home/neovim/init.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/home/neovim/init.vim b/home/neovim/init.vim
index 159e7e0..c73fb73 100644
--- a/home/neovim/init.vim
+++ b/home/neovim/init.vim
@@ -132,6 +132,14 @@ nnoremap <c-j> ddpkJ
" I do this move pretty frequently.
nnoremap <c-w><c-w> <c-w>L<c-w>h
+" If the fzf executable is available, assume that the fzf plugin is going to
+" be loaded. In that case we want an easy way to load a file.
+if executable("fzf")
+ nnoremap <leader><leader> <CMD>FZF<CR>
+else
+ nnoremap <leader><leader> <CMD>echo "FZF not found!"<CR>
+endif
+
" Commands
"""""""""""""""""""""""""""