21 Commits
2.5.0 ... 2.5.2

Author SHA1 Message Date
fcying
9a32fd2534 Add NERDToggleCheckAllLines option to NERDCommenterToggle (#334) 2018-06-21 11:06:22 +03:00
Jiaobuzuji
e679d8a341 Add support for 'sdc' filetype (#327) 2018-03-03 15:16:47 +03:00
dandersson
670dba1bb5 Add support for Robot Framework files (#323) 2018-02-07 12:19:12 +03:00
Sean
2f973bd4fa Fix Markdown formatting 2018-02-02 12:56:54 +03:00
tlsvc
ff3d8d7d7c Add support for ANSYS Parametric Design Language (apdl) (#317) 2018-01-13 11:47:04 +03:00
Alec Shaw
af8bb4258d Add support for Praat scripting language (#316)
[Praat][1] is a program for phonetics research which has a scripting interface.

[1]: http://www.fon.hum.uva.nl/praat/
2017-12-26 11:02:19 +03:00
Caleb Maclennan
fd61bc71f6 Udate version and date strings 2017-11-07 10:46:22 +03:00
Caleb Maclennan
3e99b39f4f Add sshconfig filetype to complement sshdconfig
Mentioned in #313
2017-11-07 10:38:04 +03:00
Caleb Maclennan
09b07d50ba Merge branch 'pr/266'
Closes #266
2017-11-07 10:17:06 +03:00
Caleb Maclennan
013cfec44d Merge branch 'pr/279'
Closes #279

Since original author of this PR has deleted their Github account
I squashed their two commits and added one to fix the issue with the
implementation as noted in the PR.
2017-11-07 10:12:51 +03:00
Caleb Maclennan
d4548ebb0c Fix implementation of renpy to not include python hack 2017-11-07 10:12:00 +03:00
Komeji Koishi
c321b3460b Added filetype 'renpy' support.
Renpy is an extension of python syntax and it uses '#' comments.
2017-11-07 10:11:59 +03:00
Carlos Eduardo de Andrade
63ba1a1123 Adding support to MiniZinc constraint modeling language. (#311) 2017-10-31 18:53:26 +02:00
Ratan
376838672d Add julia multiline comment chars (#312) 2017-10-31 18:52:28 +02:00
Caleb Maclennan
285902752f Cleanup code formatting in file support matrix 2017-04-07 11:53:35 +03:00
m-pilia
d1ac2382b2 add gl shaders language (#293) 2017-04-06 13:59:25 +03:00
Lyude
a6b3cc6842 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/
2017-03-25 13:19:06 +02:00
Caleb Maclennan
d05cfd190b Revert "add support for react/jsx comments (Closes #280) (#290)"
This reverts commit 0e1f6f6866.

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.
2017-03-15 13:18:09 +03:00
Lucas Charles
0e1f6f6866 add support for react/jsx comments (Closes #280) (#290) 2017-03-12 09:08:58 +02:00
Dylan Baker
41e686824a Add support for the meson build system. (#289) 2017-02-28 08:04:50 +02:00
Aluriak
c51f5992b2 add support for turtle (.ttl) files 2016-09-10 01:20:29 +02:00
3 changed files with 71 additions and 26 deletions

View File

@@ -22,7 +22,7 @@ Comment functions so powerful—no comment necessary.
1. Add `NeoBundle 'scrooloose/nerdcommenter'` to your vimrc file.
2. Reload your vimrc or restart
3. Run `:NeoUpdate``
3. Run `:NeoUpdate`
#### [Pathogen](https://github.com/tpope/vim-pathogen)
@@ -94,6 +94,9 @@ let g:NERDCommentEmptyLines = 1
" Enable trimming of trailing whitespace when uncommenting
let g:NERDTrimTrailingWhitespace = 1
" Enable NERDCommenterToggle to check all selected lines is commented or not
let g:NERDToggleCheckAllLines = 1
```
### Default mappings

View File

@@ -488,6 +488,9 @@ change the filetype back: >
one of 'none', 'left', 'start', or
'both'.
|'NERDToggleCheckAllLines'| Enable NERDCommenterToggle to check
all selected lines is commented or not.
------------------------------------------------------------------------------
4.3 Options details *NERDComOptionsDetails*
@@ -800,6 +803,15 @@ When this option is set to 1, comments are nested automatically. That is, if
you hit |<Leader>|cc on a line that is already commented it will be commented
again.
------------------------------------------------------------------------------
*'NERDToggleCheckAllLines'*
Values: 0 or 1.
Default 0.
When this option is set to 1, NERDCommenterToggle will check all selected line,
if there have oneline not be commented, then comment all lines.
------------------------------------------------------------------------------
3.3 Default delimiter customisation *NERDComDefaultDelims*
@@ -1093,6 +1105,7 @@ Simon Hengel htmlcheetah
Matt Tolton javacc
Ivan Devat javascript.jquery
tpope cucumber,pdf
Lyude Paul piglit shader_test
==============================================================================
10. License *NERDComLicense*

View File

@@ -3,8 +3,8 @@
" Description: vim global plugin that provides easy code commenting
" Author: Martin Grenfell <martin.grenfell at gmail dot com>
" Maintainer: Caleb Maclennan <caleb@alerque.com>
" Version: 2.4.0
" Last Change: Tue May 24 14:03:29 EEST 2016
" Version: 2.5.1
" Last Change: Tue Nov 7 10:45:53 +03 2017
" License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
@@ -65,6 +65,7 @@ call s:InitVariable("g:NERDRPlace", "<]")
call s:InitVariable("g:NERDSpaceDelims", 0)
call s:InitVariable("g:NERDDefaultAlign", "none")
call s:InitVariable("g:NERDTrimTrailingWhitespace", 0)
call s:InitVariable("g:NERDToggleCheckAllLines", 0)
let s:NERDFileNameEscape="[]#*$%'\" ?`!&();<>\\"
@@ -82,13 +83,14 @@ let s:delimiterMap = {
\ 'ansible': { 'left': '#' },
\ 'apache': { 'left': '#' },
\ 'apachestyle': { 'left': '#' },
\ 'apdl': { 'left': '!' },
\ 'applescript': { 'left': '--', 'leftAlt': '(*', 'rightAlt': '*)' },
\ 'armasm': { 'left': ';' },
\ 'asciidoc': { 'left': '//' },
\ 'asm': { 'left': ';', 'leftAlt': '#' },
\ 'asm68k': { 'left': ';' },
\ 'asn': { 'left': '--' },
\ 'asp': { 'left': '%', 'leftAlt': '%*','rightAlt': '*%' },
\ 'asp': { 'left': '%', 'leftAlt': '%*', 'rightAlt': '*%' },
\ 'aspvbs': { 'left': '''', 'leftAlt': '<!--', 'rightAlt': '-->' },
\ 'asterisk': { 'left': ';' },
\ 'asy': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
@@ -106,7 +108,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 +132,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 +144,7 @@ let s:delimiterMap = {
\ 'desktop': { 'left': '#' },
\ 'dhcpd': { 'left': '#' },
\ 'diff': { 'left': '#' },
\ 'django': { 'left': '<!--','right': '-->', 'leftAlt': '{#', 'rightAlt': '#}' },
\ 'django': { 'left': '<!--', 'right': '-->', 'leftAlt': '{#', 'rightAlt': '#}' },
\ 'dns': { 'left': ';' },
\ 'docbk': { 'left': '<!--', 'right': '-->' },
\ 'dockerfile': { 'left': '#' },
@@ -183,7 +185,7 @@ let s:delimiterMap = {
\ 'gdb': { 'left': '#' },
\ 'gdmo': { 'left': '--' },
\ 'geek': { 'left': 'GEEK_COMMENT:' },
\ 'genshi': { 'left': '<!--','right': '-->', 'leftAlt': '{#', 'rightAlt': '#}' },
\ 'genshi': { 'left': '<!--', 'right': '-->', 'leftAlt': '{#', 'rightAlt': '#}' },
\ 'gentoo-conf-d': { 'left': '#' },
\ 'gentoo-env-d': { 'left': '#' },
\ 'gentoo-init-d': { 'left': '#' },
@@ -195,15 +197,16 @@ let s:delimiterMap = {
\ 'gitconfig': { 'left': ';' },
\ 'gitignore': { 'left': '#' },
\ 'gitrebase': { 'left': '#' },
\ 'glsl': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'gnuplot': { 'left': '#' },
\ 'go': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'groovy': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'gsp': { 'left': '<%--', 'right': '--%>', 'leftAlt': '<!--','rightAlt': '-->'},
\ 'gsp': { 'left': '<%--', 'right': '--%>', 'leftAlt': '<!--', 'rightAlt': '-->' },
\ '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': ' --}}' },
@@ -212,7 +215,7 @@ let s:delimiterMap = {
\ 'hog': { 'left': '#' },
\ 'hostsaccess': { 'left': '#' },
\ 'htmlcheetah': { 'left': '##' },
\ 'htmldjango': { 'left': '<!--','right': '-->', 'leftAlt': '{#', 'rightAlt': '#}' },
\ 'htmldjango': { 'left': '<!--', 'right': '-->', 'leftAlt': '{#', 'rightAlt': '#}' },
\ 'htmlos': { 'left': '#', 'right': '/#' },
\ 'hxml': { 'left': '#' },
\ 'hyphy': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
@@ -234,17 +237,17 @@ let s:delimiterMap = {
\ 'javascript.jquery': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'jess': { 'left': ';' },
\ 'jgraph': { 'left': '(*', 'right': '*)' },
\ 'jinja': { 'left': '<!--','right': '-->', 'leftAlt': '{#', 'rightAlt': '#}' },
\ 'jinja': { 'left': '<!--', 'right': '-->', 'leftAlt': '{#', 'rightAlt': '#}' },
\ 'jproperties': { 'left': '#' },
\ 'jsp': { 'left': '<%--', 'right': '--%>' },
\ 'julia': { 'left': '#' },
\ 'julia': { 'left': '# ', 'leftAlt': '#=', 'rightAlt': '=#' },
\ 'kix': { 'left': ';' },
\ 'kscript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ '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 %}' },
@@ -271,9 +274,11 @@ let s:delimiterMap = {
\ 'master': { 'left': '$' },
\ 'matlab': { 'left': '%', 'leftAlt': '%{', 'rightAlt': '%}' },
\ 'mel': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'meson': { 'left': '#' },
\ 'mib': { 'left': '--' },
\ 'mips': { 'left': '#'},
\ 'mirah': {'left': '#'},
\ 'minizinc': { 'left': '% ', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'mips': { 'left': '#' },
\ 'mirah': {'left': '#' },
\ 'mkd': { 'left': '<!---', 'right': '-->' },
\ 'mma': { 'left': '(*', 'right': '*)' },
\ 'model': { 'left': '$', 'right': '$' },
@@ -311,7 +316,7 @@ let s:delimiterMap = {
\ 'ox': { 'left': '//' },
\ 'paludis-use-conf': { 'left': '#' },
\ 'pandoc': { 'left': '<!--', 'right': '-->' },
\ 'pascal': { 'left': '{','right': '}', 'leftAlt': '(*', 'rightAlt': '*)' },
\ 'pascal': { 'left': '{', 'right': '}', 'leftAlt': '(*', 'rightAlt': '*)' },
\ 'patran': { 'left': '$', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'pcap': { 'left': '#' },
\ 'pccts': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
@@ -332,6 +337,7 @@ let s:delimiterMap = {
\ 'povini': { 'left': ';' },
\ 'ppd': { 'left': '%' },
\ 'ppwiz': { 'left': ';;' },
\ 'praat': { 'left': '#' },
\ 'privoxy': { 'left': '#' },
\ 'processing': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'prolog': { 'left': '%', 'leftAlt': '/*', 'rightAlt': '*/' },
@@ -350,10 +356,12 @@ let s:delimiterMap = {
\ 'rebol': { 'left': ';' },
\ 'registry': { 'left': ';' },
\ 'remind': { 'left': '#' },
\ 'renpy': { 'left': '# ' },
\ 'resolv': { 'left': '#' },
\ 'rgb': { 'left': '!' },
\ 'rib': { 'left': '#' },
\ 'rmd': { 'left': '#' },
\ 'robot': { 'left': '#' },
\ 'robots': { 'left': '#' },
\ 'rspec': { 'left': '#' },
\ 'ruby': { 'left': '#', 'leftAlt': '=begin', 'rightAlt': '=end' },
@@ -367,11 +375,13 @@ let s:delimiterMap = {
\ 'scilab': { 'left': '//' },
\ 'scons': { 'left': '#' },
\ 'scsh': { 'left': ';' },
\ 'scss': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/'},
\ 'scss': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'sdc': { 'left': '#' },
\ 'sed': { 'left': '#' },
\ 'sgmldecl': { 'left': '--', 'right': '--' },
\ 'sgmllnx': { 'left': '<!--', 'right': '-->' },
\ 'sh': { 'left': '#' },
\ 'shader_test': { 'left': '#' },
\ 'sicad': { 'left': '*' },
\ 'sile': { 'left': '%' },
\ 'simula': { 'left': '%', 'leftAlt': '--' },
@@ -403,12 +413,13 @@ let s:delimiterMap = {
\ 'sqr': { 'left': '!' },
\ 'squid': { 'left': '#' },
\ 'ss': { 'left': ';', 'leftAlt': '#|', 'rightAlt': '|#' },
\ 'sshconfig': { 'left': '#' },
\ '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': ';' },
@@ -429,6 +440,7 @@ let s:delimiterMap = {
\ 'tsalt': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'tsscl': { 'left': '#' },
\ 'tssgm': { 'left': "comment = '", 'right': "'" },
\ 'ttl': { 'left': '#' },
\ 'tup': { 'left': '#' },
\ 'twig': { 'left': '{#', 'right': '#}' },
\ 'txt2tags': { 'left': '%' },
@@ -440,7 +452,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': '#' },
@@ -1247,12 +1259,29 @@ function! NERDComment(mode, type) range
endtry
elseif a:type ==? 'Toggle'
let theLine = getline(firstLine)
if s:IsInSexyComment(firstLine) || s:IsCommentedFromStartOfLine(s:Left(), theLine) || s:IsCommentedFromStartOfLine(s:Left({'alt': 1}), theLine)
call s:UncommentLines(firstLine, lastLine)
if g:NERDToggleCheckAllLines ==# 0
let theLine = getline(firstLine)
if s:IsInSexyComment(firstLine) || s:IsCommentedFromStartOfLine(s:Left(), theLine) || s:IsCommentedFromStartOfLine(s:Left({'alt': 1}), theLine)
call s:UncommentLines(firstLine, lastLine)
else
call s:CommentLinesToggle(forceNested, firstLine, lastLine)
endif
else
let l:commentAllLines = 0
for i in range(firstLine, lastLine)
let theLine = getline(i)
" if have one line no comment, then comment all lines
if !s:IsInSexyComment(firstLine) && !s:IsCommentedFromStartOfLine(s:Left(), theLine) && !s:IsCommentedFromStartOfLine(s:Left({'alt': 1}), theLine)
let l:commentAllLines = 1
break
else
endif
endfor
if l:commentAllLines ==# 1
call s:CommentLinesToggle(forceNested, firstLine, lastLine)
else
call s:UncommentLines(firstLine, lastLine)
endif
endif
elseif a:type ==? 'Minimal'