diff --git a/plugin/double-tap.vim b/plugin/double-tap.vim index 44b2816..d53565c 100644 --- a/plugin/double-tap.vim +++ b/plugin/double-tap.vim @@ -43,7 +43,7 @@ let s:commStart = {} " dict to hold the comment starters using " This function returns a regular if the current line " is not simply an empty comment. Otherwise it clears the line -function! Doubletap_detect_empty_comment() +function! s:Detect_empty_comment() " Do nothing in particular if no filetype is set if empty(&ft) return "\" @@ -60,7 +60,11 @@ function! Doubletap_detect_empty_comment() endif endfunction -inoremap Doubletap_detect_empty_comment() +if !hasmapto('DoubletapDetect') + imap DoubletapDetect +endif + +inoremap DoubletapDetect Detect_empty_comment() " Teardown:{{{1 "reset &cpo back to users setting