From 1f06d8a4ddabe0621af432f96d0d39d10f24ae61 Mon Sep 17 00:00:00 2001 From: Dirk Willrodt Date: Fri, 20 Sep 2013 13:44:07 +0200 Subject: [PATCH] remove space at end of appended comment --- plugin/NERD_commenter.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 13c7693..3e82b27 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -530,12 +530,12 @@ function s:AppendCommentToLine() "stick the delimiters down at the end of the line. We have to format the "comment with spaces as appropriate - execute ":normal! " . insOrApp . (isLineEmpty ? '' : ' ') . left . right . " " + execute ":normal! " . insOrApp . (isLineEmpty ? '' : ' ') . left . right " if there is a right delimiter then we gotta move the cursor left " by the len of the right delimiter so we insert between the delimiters if lenRight > 0 - let leftMoveAmount = lenRight + let leftMoveAmount = lenRight - 1 execute ":normal! " . leftMoveAmount . "h" endif startinsert