From 607253203dc2fc1798dbe2ea9a3471db9c12e005 Mon Sep 17 00:00:00 2001 From: alejandrogallo Date: Sun, 22 Jan 2017 07:05:45 +0100 Subject: [PATCH 1/7] Add gitignore support (#284) --- plugin/NERD_commenter.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index e8e1af9..3c4f1c8 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -193,6 +193,7 @@ let s:delimiterMap = { \ 'gentoo-package-use': { 'left': '#' }, \ 'gitcommit': { 'left': '#' }, \ 'gitconfig': { 'left': ';' }, + \ 'gitignore': { 'left': '#' }, \ 'gitrebase': { 'left': '#' }, \ 'gnuplot': { 'left': '#' }, \ 'go': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, From c5f8cbf70d37d261d2fc6cccd78bf2fc76bd40a1 Mon Sep 17 00:00:00 2001 From: Alexandr Date: Mon, 20 Feb 2017 09:03:41 +0200 Subject: [PATCH 2/7] Fix removing space when uncommenting spaced AltDelims multipart comment (#286) --- plugin/NERD_commenter.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 3c4f1c8..c3d7eb5 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -623,7 +623,7 @@ 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 length of the right delimiter so we insert between the delimiters @@ -1396,7 +1396,7 @@ function s:RemoveDelimiters(left, right, line) "if the user has specified that there is a space before the right delimiter "then check for the space and remove it if it is there - if delimsSpaced && strpart(line, rightIndx-s:lenSpaceStr, s:lenSpaceStr) == s:spaceStr && s:Multipart() + if delimsSpaced && strpart(line, rightIndx-s:lenSpaceStr, s:lenSpaceStr) == s:spaceStr && (s:Multipart() || s:AltMultipart()) let line = strpart(line, 0, rightIndx-s:lenSpaceStr) . strpart(line, rightIndx) endif endif @@ -1418,7 +1418,7 @@ function s:SetupStateBeforeLineComment(topLine, bottomLine) let state = {'foldmethod' : &foldmethod, \'ignorecase' : &ignorecase} - " Vim's foldmethods are evaluated every time we use 'setline', which can + " Vim's foldmethods are evaluated every time we use 'setline', which can " make commenting wide ranges of lines VERY slow. We'll change it to " manual, do the commenting stuff and recover it later. To avoid slowing " down commenting few lines, we avoid doing this for ranges smaller than @@ -1623,7 +1623,7 @@ function s:UncommentLinesSexy(topline, bottomline) let theLine = s:SwapOuterPlaceHoldersForMultiPartDelims(theLine) call setline(bottomline, theLine) endif - + " remove trailing whitespaces for first and last line if g:NERDTrimTrailingWhitespace == 1 let theLine = getline(a:bottomline) From 59552f2e885a70371d7059b6ef22d57eb365d4a0 Mon Sep 17 00:00:00 2001 From: Zack Youngren Date: Mon, 20 Feb 2017 02:08:14 -0500 Subject: [PATCH 3/7] Add multi-line comments for Elm (#283) Technically the minimum necessary syntax for block comments requires only a single hyphen (`-}`, `{-`), but I have found that using a double hyphen plays a bit more nicely with the elmcast/elm-vim auto-formatting. Further, uncommenting when using the single dashes leaves an extra level of indentation (again, when using elmcast/elm-vim). --- plugin/NERD_commenter.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index c3d7eb5..5bc8898 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -159,7 +159,7 @@ let s:delimiterMap = { \ 'eiffel': { 'left': '--' }, \ 'elf': { 'left': "'" }, \ 'elixir': { 'left': '#' }, - \ 'elm': { 'left': '--' }, + \ 'elm': { 'left': '--', 'leftAlt': '{--', 'rightAlt': '--}' }, \ 'elmfilt': { 'left': '#' }, \ 'ember-script': { 'left': '#' }, \ 'emblem': { 'left': '/' }, From 41e686824a5b77ba5afe9c5dabdc045aac922c5a Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 27 Feb 2017 22:04:50 -0800 Subject: [PATCH 4/7] Add support for the meson build system. (#289) --- plugin/NERD_commenter.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 5bc8898..250b041 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -271,6 +271,7 @@ let s:delimiterMap = { \ 'master': { 'left': '$' }, \ 'matlab': { 'left': '%', 'leftAlt': '%{', 'rightAlt': '%}' }, \ 'mel': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, + \ 'meson': { 'left': '#' }, \ 'mib': { 'left': '--' }, \ 'mips': { 'left': '#'}, \ 'mirah': {'left': '#'}, From 0e1f6f68669f67a397edc19f698812ac49476457 Mon Sep 17 00:00:00 2001 From: Lucas Charles Date: Sat, 11 Mar 2017 23:08:58 -0800 Subject: [PATCH 5/7] add support for react/jsx comments (Closes #280) (#290) --- plugin/NERD_commenter.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 250b041..923b4ac 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -232,6 +232,7 @@ let s:delimiterMap = { \ 'javacc': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'javascript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'javascript.jquery': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, + \ 'javascript.jsx': { 'left': '{/*', 'right': '*/}' }, \ 'jess': { 'left': ';' }, \ 'jgraph': { 'left': '(*', 'right': '*)' }, \ 'jinja': { 'left': '', 'leftAlt': '{#', 'rightAlt': '#}' }, From d05cfd190bc351225f57429cb356420ad67e112c Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 15 Mar 2017 13:18:09 +0300 Subject: [PATCH 6/7] Revert "add support for react/jsx comments (Closes #280) (#290)" This reverts commit 0e1f6f68669f67a397edc19f698812ac49476457. Given the unexpected behaviour of this and disruption to people's established work flows, I'm reverting this until a better solution can be found that only handles the special comment format inside React code blocks. --- plugin/NERD_commenter.vim | 1 - 1 file changed, 1 deletion(-) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 923b4ac..250b041 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -232,7 +232,6 @@ let s:delimiterMap = { \ 'javacc': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'javascript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'javascript.jquery': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, - \ 'javascript.jsx': { 'left': '{/*', 'right': '*/}' }, \ 'jess': { 'left': ';' }, \ 'jgraph': { 'left': '(*', 'right': '*)' }, \ 'jinja': { 'left': '', 'leftAlt': '{#', 'rightAlt': '#}' }, From a6b3cc68427682a26266f29552b978538c8cbbbd Mon Sep 17 00:00:00 2001 From: Lyude Date: Sat, 25 Mar 2017 07:19:06 -0400 Subject: [PATCH 7/7] Add support for piglit's shader_test files (#292) This adds support for shader_test files in piglit, the open source test suite for OpenGL implementations such as mesa. More information on piglit can be found at: https://piglit.freedesktop.org/ --- doc/NERD_commenter.txt | 1 + plugin/NERD_commenter.vim | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/NERD_commenter.txt b/doc/NERD_commenter.txt index a728498..d37507a 100644 --- a/doc/NERD_commenter.txt +++ b/doc/NERD_commenter.txt @@ -1093,6 +1093,7 @@ Simon Hengel htmlcheetah Matt Tolton javacc Ivan Devat javascript.jquery tpope cucumber,pdf +Lyude Paul piglit shader_test ============================================================================== 10. License *NERDComLicense* diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 250b041..b27426d 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -373,6 +373,7 @@ let s:delimiterMap = { \ 'sgmldecl': { 'left': '--', 'right': '--' }, \ 'sgmllnx': { 'left': '' }, \ 'sh': { 'left': '#' }, + \ 'shader_test': { 'left': '#' }, \ 'sicad': { 'left': '*' }, \ 'sile': { 'left': '%' }, \ 'simula': { 'left': '%', 'leftAlt': '--' },