From 607253203dc2fc1798dbe2ea9a3471db9c12e005 Mon Sep 17 00:00:00 2001 From: alejandrogallo Date: Sun, 22 Jan 2017 07:05:45 +0100 Subject: [PATCH 01/11] 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 02/11] 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 03/11] 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 04/11] 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 05/11] 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 06/11] 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 07/11] 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': '--' }, From d1ac2382b2bd3c2ff7efa09fc185c8975b584b03 Mon Sep 17 00:00:00 2001 From: m-pilia Date: Thu, 6 Apr 2017 12:59:25 +0200 Subject: [PATCH 08/11] add gl shaders language (#293) --- plugin/NERD_commenter.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index b27426d..cd45453 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -195,6 +195,7 @@ let s:delimiterMap = { \ 'gitconfig': { 'left': ';' }, \ 'gitignore': { 'left': '#' }, \ 'gitrebase': { 'left': '#' }, + \ 'glsl': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'gnuplot': { 'left': '#' }, \ 'go': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'groovy': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, From 285902752f7ab2052ac700a6d29b263dd5788afb Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Fri, 7 Apr 2017 11:52:01 +0300 Subject: [PATCH 09/11] Cleanup code formatting in file support matrix --- plugin/NERD_commenter.vim | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index cd45453..df14ece 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -88,7 +88,7 @@ let s:delimiterMap = { \ 'asm': { 'left': ';', 'leftAlt': '#' }, \ 'asm68k': { 'left': ';' }, \ 'asn': { 'left': '--' }, - \ 'asp': { 'left': '%', 'leftAlt': '%*','rightAlt': '*%' }, + \ 'asp': { 'left': '%', 'leftAlt': '%*', 'rightAlt': '*%' }, \ 'aspvbs': { 'left': '''', 'leftAlt': '' }, \ 'asterisk': { 'left': ';' }, \ 'asy': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, @@ -106,7 +106,7 @@ let s:delimiterMap = { \ 'blade': { 'left': '{{--', 'right': '--}}' }, \ 'bst': { 'left': '%' }, \ 'btm': { 'left': '::' }, - \ 'c': { 'left': '/*','right': '*/', 'leftAlt': '//' }, + \ 'c': { 'left': '/*', 'right': '*/', 'leftAlt': '//' }, \ 'cabal': { 'left': '--' }, \ 'calibre': { 'left': '//' }, \ 'caos': { 'left': '*' }, @@ -130,7 +130,7 @@ let s:delimiterMap = { \ 'csp': { 'left': '--' }, \ 'cterm': { 'left': '*' }, \ 'cucumber': { 'left': '#' }, - \ 'cuda': { 'left': '/*','right': '*/', 'leftAlt': '//' }, + \ 'cuda': { 'left': '/*', 'right': '*/', 'leftAlt': '//' }, \ 'cvs': { 'left': 'CVS:' }, \ 'cython': { 'left': '# ', 'leftAlt': '#' }, \ 'd': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, @@ -142,7 +142,7 @@ let s:delimiterMap = { \ 'desktop': { 'left': '#' }, \ 'dhcpd': { 'left': '#' }, \ 'diff': { 'left': '#' }, - \ 'django': { 'left': '', 'leftAlt': '{#', 'rightAlt': '#}' }, + \ 'django': { 'left': '', 'leftAlt': '{#', 'rightAlt': '#}' }, \ 'dns': { 'left': ';' }, \ 'docbk': { 'left': '' }, \ 'dockerfile': { 'left': '#' }, @@ -183,7 +183,7 @@ let s:delimiterMap = { \ 'gdb': { 'left': '#' }, \ 'gdmo': { 'left': '--' }, \ 'geek': { 'left': 'GEEK_COMMENT:' }, - \ 'genshi': { 'left': '', 'leftAlt': '{#', 'rightAlt': '#}' }, + \ 'genshi': { 'left': '', 'leftAlt': '{#', 'rightAlt': '#}' }, \ 'gentoo-conf-d': { 'left': '#' }, \ 'gentoo-env-d': { 'left': '#' }, \ 'gentoo-init-d': { 'left': '#' }, @@ -199,12 +199,12 @@ let s:delimiterMap = { \ 'gnuplot': { 'left': '#' }, \ 'go': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'groovy': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, - \ 'gsp': { 'left': '<%--', 'right': '--%>', 'leftAlt': ''}, + \ 'gsp': { 'left': '<%--', 'right': '--%>', 'leftAlt': '' }, \ 'gtkrc': { 'left': '#' }, \ 'h': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'haml': { 'left': '-#', 'leftAlt': '/' }, \ 'handlebars': { 'left': '{{!-- ', 'right': ' --}}' }, - \ 'haskell': { 'left': '{-','right': '-}', 'nested': 1, 'leftAlt': '--', 'nestedAlt': 1 }, + \ 'haskell': { 'left': '{-', 'right': '-}', 'nested': 1, 'leftAlt': '--', 'nestedAlt': 1 }, \ 'haxe': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'hb': { 'left': '#' }, \ 'hbs': { 'left': '{{!-- ', 'right': ' --}}' }, @@ -213,7 +213,7 @@ let s:delimiterMap = { \ 'hog': { 'left': '#' }, \ 'hostsaccess': { 'left': '#' }, \ 'htmlcheetah': { 'left': '##' }, - \ 'htmldjango': { 'left': '', 'leftAlt': '{#', 'rightAlt': '#}' }, + \ 'htmldjango': { 'left': '', 'leftAlt': '{#', 'rightAlt': '#}' }, \ 'htmlos': { 'left': '#', 'right': '/#' }, \ 'hxml': { 'left': '#' }, \ 'hyphy': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, @@ -235,7 +235,7 @@ let s:delimiterMap = { \ 'javascript.jquery': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'jess': { 'left': ';' }, \ 'jgraph': { 'left': '(*', 'right': '*)' }, - \ 'jinja': { 'left': '', 'leftAlt': '{#', 'rightAlt': '#}' }, + \ 'jinja': { 'left': '', 'leftAlt': '{#', 'rightAlt': '#}' }, \ 'jproperties': { 'left': '#' }, \ 'jsp': { 'left': '<%--', 'right': '--%>' }, \ 'julia': { 'left': '#' }, @@ -244,8 +244,8 @@ let s:delimiterMap = { \ 'lace': { 'left': '--' }, \ 'laravel': { 'left': '{{--', 'right': '--}}' }, \ 'ldif': { 'left': '#' }, - \ 'less': { 'left': '/*','right': '*/' }, - \ 'lhaskell': { 'left': '>{-','right': '-}', 'leftAlt': '>-- ' }, + \ 'less': { 'left': '/*', 'right': '*/' }, + \ 'lhaskell': { 'left': '>{-', 'right': '-}', 'leftAlt': '>-- ' }, \ 'lilo': { 'left': '#' }, \ 'lilypond': { 'left': '%' }, \ 'liquid': { 'left': '{% comment %}', 'right': '{% endcomment %}' }, @@ -274,8 +274,8 @@ let s:delimiterMap = { \ 'mel': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'meson': { 'left': '#' }, \ 'mib': { 'left': '--' }, - \ 'mips': { 'left': '#'}, - \ 'mirah': {'left': '#'}, + \ 'mips': { 'left': '#' }, + \ 'mirah': {'left': '#' }, \ 'mkd': { 'left': '' }, \ 'mma': { 'left': '(*', 'right': '*)' }, \ 'model': { 'left': '$', 'right': '$' }, @@ -313,7 +313,7 @@ let s:delimiterMap = { \ 'ox': { 'left': '//' }, \ 'paludis-use-conf': { 'left': '#' }, \ 'pandoc': { 'left': '' }, - \ 'pascal': { 'left': '{','right': '}', 'leftAlt': '(*', 'rightAlt': '*)' }, + \ 'pascal': { 'left': '{', 'right': '}', 'leftAlt': '(*', 'rightAlt': '*)' }, \ 'patran': { 'left': '$', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'pcap': { 'left': '#' }, \ 'pccts': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, @@ -369,7 +369,7 @@ let s:delimiterMap = { \ 'scilab': { 'left': '//' }, \ 'scons': { 'left': '#' }, \ 'scsh': { 'left': ';' }, - \ 'scss': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/'}, + \ 'scss': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'sed': { 'left': '#' }, \ 'sgmldecl': { 'left': '--', 'right': '--' }, \ 'sgmllnx': { 'left': '' }, @@ -409,9 +409,9 @@ let s:delimiterMap = { \ 'sshdconfig': { 'left': '#' }, \ 'st': { 'left': '"' }, \ 'stan': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, - \ 'stp': { 'left': '/*','right': '*/', 'leftAlt': '//' }, + \ 'stp': { 'left': '/*', 'right': '*/', 'leftAlt': '//' }, \ 'supercollider': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, - \ 'swift': { 'left': '/*','right': '*/', 'leftAlt': '//' }, + \ 'swift': { 'left': '/*', 'right': '*/', 'leftAlt': '//' }, \ 'systemverilog': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'tads': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'tags': { 'left': ';' }, @@ -443,7 +443,7 @@ let s:delimiterMap = { \ 'vasp': { 'left': '!' }, \ 'vb': { 'left': "'" }, \ 'velocity': { 'left': "##", 'right': "", 'leftAlt': '#*', 'rightAlt': '*#' }, - \ 'vera': { 'left': '/*','right': '*/', 'leftAlt': '//' }, + \ 'vera': { 'left': '/*', 'right': '*/', 'leftAlt': '//' }, \ 'verilog': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'verilog_systemverilog': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'vgrindefs': { 'left': '#' }, From 376838672df561bb2d7422933cacf25c0e1b8fed Mon Sep 17 00:00:00 2001 From: Ratan Date: Tue, 31 Oct 2017 22:22:28 +0530 Subject: [PATCH 10/11] Add julia multiline comment chars (#312) --- 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 df14ece..f8ed1df 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -238,7 +238,7 @@ let s:delimiterMap = { \ 'jinja': { 'left': '', 'leftAlt': '{#', 'rightAlt': '#}' }, \ 'jproperties': { 'left': '#' }, \ 'jsp': { 'left': '<%--', 'right': '--%>' }, - \ 'julia': { 'left': '#' }, + \ 'julia': { 'left': '# ', 'leftAlt': '#=', 'rightAlt': '=#' }, \ 'kix': { 'left': ';' }, \ 'kscript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'lace': { 'left': '--' }, From 63ba1a1123609c9bfb9f5d76debcd34afe429096 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo de Andrade Date: Tue, 31 Oct 2017 12:53:26 -0400 Subject: [PATCH 11/11] Adding support to MiniZinc constraint modeling language. (#311) --- plugin/NERD_commenter.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index f8ed1df..f62138f 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -274,6 +274,7 @@ let s:delimiterMap = { \ 'mel': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'meson': { 'left': '#' }, \ 'mib': { 'left': '--' }, + \ 'minizinc': { 'left': '% ', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'mips': { 'left': '#' }, \ 'mirah': {'left': '#' }, \ 'mkd': { 'left': '' },