From 99c112fe4f714e7a8d593170c59ae564c67fde96 Mon Sep 17 00:00:00 2001 From: Randy Morris Date: Sat, 5 Nov 2011 17:08:18 -0400 Subject: [PATCH 1/3] add whitespace to search map Prevents the user from having to type a space before the search term. --- autoload/vundle/scripts.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index 658944b..8f27687 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -93,7 +93,7 @@ func! vundle#scripts#view(title, headers, results) nnoremap c :BundleClean nnoremap C :BundleClean! - nnoremap s :BundleSearch + nnoremap s :BundleSearch nnoremap R :call vundle#scripts#reload() " goto first line after headers From b0d3b6f8f694f9348179a3ba88451cc0367c7596 Mon Sep 17 00:00:00 2001 From: Randy Morris Date: Sat, 5 Nov 2011 17:09:39 -0400 Subject: [PATCH 2/3] whitespace changes in the BundleClean input prompt --- autoload/vundle/installer.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index ce9db38..c002ef6 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -139,7 +139,7 @@ func! vundle#installer#clean(bang) abort call vundle#scripts#view('clean', headers, names) redraw - if (a:bang || empty(names) || input('Continue ? [ y/n ]:') =~? 'y') + if (a:bang || empty(names) || input('Continue? [y/n]: ') =~? 'y') call s:process(a:bang, 'D') endif endf From 5adaa6b3c47caacc56691b53cb34f94195fdd6d4 Mon Sep 17 00:00:00 2001 From: Randy Morris Date: Sat, 5 Nov 2011 17:24:20 -0400 Subject: [PATCH 3/3] give BundleClean prompt a default value of 'y' Also save/restore input so potential mappings aren't broken. --- autoload/vundle/installer.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index c002ef6..5fb371e 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -139,8 +139,15 @@ func! vundle#installer#clean(bang) abort call vundle#scripts#view('clean', headers, names) redraw - if (a:bang || empty(names) || input('Continue? [y/n]: ') =~? 'y') + if (a:bang || empty(names)) call s:process(a:bang, 'D') + else + call inputsave() + let response = input('Continue? [Y/n]: ') + call inputrestore() + if (response =~? 'y' || response == '') + call s:process(a:bang, 'D') + endif endif endf