From 4dd72ab0afdd916421e6c61b74a59f141ed0422f Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Mon, 12 Mar 2012 10:29:28 +0100 Subject: [PATCH] Make mappings repeatable with . through repeat.vim Use of repeat.vim is purely optional, but very beneficial for typical commenting uses. --- doc/NERD_commenter.txt | 4 ++++ plugin/NERD_commenter.vim | 2 ++ 2 files changed, 6 insertions(+) diff --git a/doc/NERD_commenter.txt b/doc/NERD_commenter.txt index c7fa30a..5560fcc 100644 --- a/doc/NERD_commenter.txt +++ b/doc/NERD_commenter.txt @@ -139,6 +139,10 @@ left side (||cl) or both sides (||cb). [count]||cu |NERDComUncommentLine| Uncomments the selected line(s). + +With the optional repeat.vim plugin (vimscript #2136), the mappings can also +be repeated via |.| + ------------------------------------------------------------------------------ 3.2 Functionality details *NERDComFunctionalityDetails* diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 084e2a9..6afa6c5 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -1128,6 +1128,8 @@ function! NERDComment(mode, type) range endif let &ignorecase = oldIgnoreCase + + silent! call repeat#set("\NERDCommenter". a:type) endfunction " Function: s:PlaceDelimitersAndInsBetween() function {{{2