From 2c30337acb1b9ceb59fc815b9b6b4fd9a58e449e Mon Sep 17 00:00:00 2001 From: Mark Woods Date: Fri, 29 Nov 2024 08:28:15 +0000 Subject: [PATCH] Rename enable_fuzzyy_keymaps to fuzzyy_enable_mappings - fuzzyy options should really be prefixed with fuzzyy_ - use "mappings" to avoid confusion with fuzzy_keymaps --- README.md | 4 ++-- plugin/fuzzyy.vim | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 19d0844..3cf8930 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ you can set `g:fuzzyy_keymaps` to change these defaults. ## Default Keymaps -you can set `g:enable_fuzzyy_keymaps = 0` to disable default keymaps +you can set `g:fuzzyy_enable_mappings = 0` to disable default mappings ```vim nnoremap fb :FuzzyInBuffer @@ -101,7 +101,7 @@ nnoremap fm :FuzzyMRUFiles ```vim " Set to 0 to disable default keybindings " Default to 1 -let g:enable_fuzzyy_keymaps = 0 +let g:fuzzyy_enable_mappings = 0 " Make FuzzyFiles respect .gitignore if possible " only work when diff --git a/plugin/fuzzyy.vim b/plugin/fuzzyy.vim index 41de5c7..9266410 100644 --- a/plugin/fuzzyy.vim +++ b/plugin/fuzzyy.vim @@ -9,7 +9,13 @@ if exists("g:loaded_fuzzyy") endif g:loaded_fuzzyy = 1 -g:enable_fuzzyy_keymaps = exists('g:enable_fuzzyy_keymaps') ? g:enable_fuzzyy_keymaps : 1 +# Deprecated options +if exists('g:enable_fuzzyy_keymaps') + echo 'fuzzyy: g:enable_fuzzyy_keymaps is deprecated, use g:fuzzyy_enable_mappings' + g:fuzzyy_enable_mappings = g:enable_fuzzyy_keymaps +endif + +g:fuzzyy_enable_mappings = exists('g:fuzzyy_enable_mappings') ? g:fuzzyy_enable_mappings : 1 g:fuzzyy_buffers_exclude = exists('g:fuzzyy_buffers_exclude') ? g:fuzzyy_buffers_exclude : ['__vista__'] @@ -76,7 +82,7 @@ command! -nargs=0 FuzzyGitFiles files.Start(windows.FuzzyFiles, 'git ls-files') command! -nargs=0 FuzzyCmdHistory cmdhistory.Start() command! -nargs=0 FuzzyMRUFiles mru.Start(windows.FuzzyMRUFiles) -if g:enable_fuzzyy_keymaps +if g:fuzzyy_enable_mappings nnoremap fb :FuzzyInBuffer nnoremap fc :FuzzyColors nnoremap fd :FuzzyHelps