mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-09 02:13:45 -05:00
Compare commits
110 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee14557c87 | ||
|
|
8098fea8d9 | ||
|
|
7e3f47ed8d | ||
|
|
06683e3311 | ||
|
|
dda8510e0c | ||
|
|
a0003bc926 | ||
|
|
ca94c70dba | ||
|
|
44b4c26b86 | ||
|
|
5d8bb28113 | ||
|
|
f65d86fea3 | ||
|
|
1d92203107 | ||
|
|
fe73c80dc8 | ||
|
|
cc9f986514 | ||
|
|
03d9562db8 | ||
|
|
1301323179 | ||
|
|
842055ae43 | ||
|
|
68bf65fcd2 | ||
|
|
aaf2471da7 | ||
|
|
e14bdb0735 | ||
|
|
8dda3f17e0 | ||
|
|
ddd235757b | ||
|
|
d6ca231ac9 | ||
|
|
fe71371c15 | ||
|
|
226063bfc1 | ||
|
|
d6282ef7a3 | ||
|
|
c2a3f093ae | ||
|
|
b8c5a4443c | ||
|
|
6bf14ce062 | ||
|
|
e6a36fb8aa | ||
|
|
5bf567d75e | ||
|
|
1ae6bd4870 | ||
|
|
6835cfe090 | ||
|
|
b54d3bbc92 | ||
|
|
27e8727a35 | ||
|
|
e164c00246 | ||
|
|
134acc595e | ||
|
|
d3718d9d21 | ||
|
|
53558869a9 | ||
|
|
0370366572 | ||
|
|
a4453c01ee | ||
|
|
377a04eeec | ||
|
|
709d01d074 | ||
|
|
2e9b7ca58e | ||
|
|
01d6c8c7f6 | ||
|
|
89c008b644 | ||
|
|
1b9033c7ee | ||
|
|
165d1e3686 | ||
|
|
4567fae10f | ||
|
|
2ea675da5e | ||
|
|
865d928a1f | ||
|
|
8a0056a610 | ||
|
|
e466dd9418 | ||
|
|
a84365f174 | ||
|
|
1fc1decbe9 | ||
|
|
dc8275ffa0 | ||
|
|
64f0798984 | ||
|
|
01f8df684c | ||
|
|
7c830eb223 | ||
|
|
af0d51d8b3 | ||
|
|
650396b1fc | ||
|
|
cf54bfc7c4 | ||
|
|
6b2cc6c41d | ||
|
|
e52840527a | ||
|
|
dee2021b8f | ||
|
|
2da9787ff1 | ||
|
|
fef5db7e92 | ||
|
|
875831209a | ||
|
|
191bb50879 | ||
|
|
e92b6f60d5 | ||
|
|
3eea85daa4 | ||
|
|
62b394aa9b | ||
|
|
953fc19af9 | ||
|
|
ded4e80efe | ||
|
|
890ab3fe2e | ||
|
|
dd7a0bf471 | ||
|
|
4b0e7a8f1a | ||
|
|
c5623a31e2 | ||
|
|
06be251c66 | ||
|
|
3aeaa92dd7 | ||
|
|
4809a9c287 | ||
|
|
0256b0a18c | ||
|
|
148fe82c42 | ||
|
|
3eb5a0fcde | ||
|
|
f5092782ee | ||
|
|
75f5b5f275 | ||
|
|
ebe9dc2a38 | ||
|
|
f2fa62bd4f | ||
|
|
7ea2aeea99 | ||
|
|
065022b1ee | ||
|
|
3bccb91e7d | ||
|
|
a24c8b79f8 | ||
|
|
f8ce318000 | ||
|
|
f95255e299 | ||
|
|
6a9764f39a | ||
|
|
6304c65434 | ||
|
|
6089d08ed3 | ||
|
|
c53ae79ca3 | ||
|
|
432fe6b156 | ||
|
|
aafe01e4e9 | ||
|
|
4f05d713b4 | ||
|
|
59735a2904 | ||
|
|
f8c60c7bd8 | ||
|
|
2783e3639d | ||
|
|
6337d56893 | ||
|
|
a24534c6f1 | ||
|
|
122490be95 | ||
|
|
d1af8af555 | ||
|
|
08d14e7342 | ||
|
|
532c58db62 | ||
|
|
fb93d5869d |
18
Rakefile
Normal file
18
Rakefile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
desc "Copy the vim/doc files into ~/.vim"
|
||||||
|
task :deploy_local do
|
||||||
|
run "cp plugin/NERD_commenter.vim ~/.vim/plugin"
|
||||||
|
run "cp doc/NERD_commenter.txt ~/.vim/doc"
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
desc "Create a zip archive for release to vim.org"
|
||||||
|
task :zip do
|
||||||
|
abort "NERD_commenter.zip already exists, aborting" if File.exist?("NERD_commenter.zip")
|
||||||
|
run "zip NERD_commenter.zip plugin/NERD_commenter.vim doc/NERD_commenter.txt"
|
||||||
|
end
|
||||||
|
|
||||||
|
def run(cmd)
|
||||||
|
puts "Executing: #{cmd}"
|
||||||
|
system cmd
|
||||||
|
end
|
||||||
|
|
||||||
@@ -23,11 +23,10 @@ CONTENTS *NERDCommenterContents*
|
|||||||
2.2.7 Yank comment map............|NERDComYankComment|
|
2.2.7 Yank comment map............|NERDComYankComment|
|
||||||
2.2.8 Comment to EOL map..........|NERDComEOLComment|
|
2.2.8 Comment to EOL map..........|NERDComEOLComment|
|
||||||
2.2.9 Append com to line map......|NERDComAppendComment|
|
2.2.9 Append com to line map......|NERDComAppendComment|
|
||||||
2.2.10 Prepend com to line map....|NERDComPrependComment|
|
2.2.10 Insert comment map.........|NERDComInsertComment|
|
||||||
2.2.11 Insert comment map.........|NERDComInsertComment|
|
2.2.11 Use alternate delims map...|NERDComAltDelim|
|
||||||
2.2.12 Use alternate delims map...|NERDComAltDelim|
|
2.2.12 Comment aligned maps.......|NERDComAlignedComment|
|
||||||
2.2.13 Comment aligned maps.......|NERDComAlignedComment|
|
2.2.13 Uncomment line map.........|NERDComUncommentLine|
|
||||||
2.2.14 Uncomment line map.........|NERDComUncommentLine|
|
|
||||||
2.3 Supported filetypes...............|NERDComFiletypes|
|
2.3 Supported filetypes...............|NERDComFiletypes|
|
||||||
2.4 Sexy Comments.....................|NERDComSexyComments|
|
2.4 Sexy Comments.....................|NERDComSexyComments|
|
||||||
2.5 The NERDComment function..........|NERDComNERDComment|
|
2.5 The NERDComment function..........|NERDComNERDComment|
|
||||||
@@ -35,24 +34,24 @@ CONTENTS *NERDCommenterContents*
|
|||||||
3.1 Options summary...................|NERDComOptionsSummary|
|
3.1 Options summary...................|NERDComOptionsSummary|
|
||||||
3.2 Options details...................|NERDComOptionsDetails|
|
3.2 Options details...................|NERDComOptionsDetails|
|
||||||
3.3 Default delimiter Options.........|NERDComDefaultDelims|
|
3.3 Default delimiter Options.........|NERDComDefaultDelims|
|
||||||
3.4 Key mapping Options...............|NERDComMappings|
|
4. Customising key mappings...............|NERDComMappings|
|
||||||
4.Issues with the script..................|NERDComIssues|
|
5. Issues with the script.................|NERDComIssues|
|
||||||
4.1 Delimiter detection heuristics....|NERDComHeuristics|
|
5.1 Delimiter detection heuristics....|NERDComHeuristics|
|
||||||
4.2 Nesting issues....................|NERDComNesting|
|
5.2 Nesting issues....................|NERDComNesting|
|
||||||
5.The author..............................|NERDComAuthor|
|
6.The author..............................|NERDComAuthor|
|
||||||
6.TODO list...............................|NERDComTodo|
|
|
||||||
7.Changelog...............................|NERDComChangelog|
|
7.Changelog...............................|NERDComChangelog|
|
||||||
8.Credits.................................|NERDComCredits|
|
8.Credits.................................|NERDComCredits|
|
||||||
|
9.License.................................|NERDComLicense|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
1. Intro *NERDCommenter*
|
1. Intro *NERDCommenter*
|
||||||
|
|
||||||
The NERD commenter provides many different commenting operations and styles
|
The NERD commenter provides many different commenting operations and styles
|
||||||
which may be invoked via key mappings and a commenting menu. These operations
|
which are invoked via key mappings and a menu. These operations are available
|
||||||
are available for most filetypes.
|
for most filetypes.
|
||||||
|
|
||||||
There are also options available that allow you to tweak the commenting engine
|
There are also options that allow to tweak the commenting engine to your
|
||||||
to you taste.
|
taste.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
2. Functionality provided *NERDComFunctionality*
|
2. Functionality provided *NERDComFunctionality*
|
||||||
@@ -61,17 +60,15 @@ to you taste.
|
|||||||
2.1 Functionality summary *NERDComFunctionalitySummary*
|
2.1 Functionality summary *NERDComFunctionalitySummary*
|
||||||
|
|
||||||
The following key mappings are provided by default (there is also a menu
|
The following key mappings are provided by default (there is also a menu
|
||||||
provided that contains menu items corresponding to all the below mappings):
|
with items corresponding to all the mappings below):
|
||||||
|
|
||||||
Most of the following mappings are for normal/visual mode only. The
|
|
||||||
|NERDComInsertComment| mapping is for insert mode only.
|
|
||||||
|
|
||||||
[count],cc |NERDComComment|
|
[count],cc |NERDComComment|
|
||||||
Comments out the current line or text selected in visual mode.
|
Comment out the current line or text selected in visual mode.
|
||||||
|
|
||||||
|
|
||||||
[count],cn |NERDComNestedComment|
|
[count],cn |NERDComNestedComment|
|
||||||
Same as |NERDComComment| but forces nesting.
|
Same as ,cc but forces nesting.
|
||||||
|
|
||||||
|
|
||||||
[count],c<space> |NERDComToggleComment|
|
[count],c<space> |NERDComToggleComment|
|
||||||
Toggles the comment state of the selected line(s). If the topmost selected
|
Toggles the comment state of the selected line(s). If the topmost selected
|
||||||
@@ -79,22 +76,19 @@ line is commented, all selected lines are uncommented and vice versa.
|
|||||||
|
|
||||||
|
|
||||||
[count],cm |NERDComMinimalComment|
|
[count],cm |NERDComMinimalComment|
|
||||||
Comments the given lines using only one set of multipart delimiters if
|
Comments the given lines using only one set of multipart delimiters.
|
||||||
possible.
|
|
||||||
|
|
||||||
|
|
||||||
[count],ci |NERDComInvertComment|
|
[count],ci |NERDComInvertComment|
|
||||||
Toggles the comment state of the selected line(s) individually. Each selected
|
Toggles the comment state of the selected line(s) individually.
|
||||||
line that is commented is uncommented and vice versa.
|
|
||||||
|
|
||||||
|
|
||||||
[count],cs |NERDComSexyComment|
|
[count],cs |NERDComSexyComment|
|
||||||
Comments out the selected lines ``sexually''
|
Comments out the selected lines ``sexily''
|
||||||
|
|
||||||
|
|
||||||
[count],cy |NERDComYankComment|
|
[count],cy |NERDComYankComment|
|
||||||
Same as |NERDComComment| except that the commented line(s) are yanked
|
Same as ,cc except that the commented line(s) are yanked first.
|
||||||
before commenting.
|
|
||||||
|
|
||||||
|
|
||||||
,c$ |NERDComEOLComment|
|
,c$ |NERDComEOLComment|
|
||||||
@@ -106,13 +100,9 @@ Adds comment delimiters to the end of line and goes into insert mode between
|
|||||||
them.
|
them.
|
||||||
|
|
||||||
|
|
||||||
,cI |NERDComPrependComment|
|
|NERDComInsertComment|
|
||||||
Adds comment delimiters to the start of line and goes into insert mode between
|
|
||||||
them.
|
|
||||||
|
|
||||||
|
|
||||||
<C-c> |NERDComInsertComment|
|
|
||||||
Adds comment delimiters at the current cursor position and inserts between.
|
Adds comment delimiters at the current cursor position and inserts between.
|
||||||
|
Disabled by default.
|
||||||
|
|
||||||
|
|
||||||
,ca |NERDComAltDelim|
|
,ca |NERDComAltDelim|
|
||||||
@@ -120,11 +110,9 @@ Switches to the alternative set of delimiters.
|
|||||||
|
|
||||||
|
|
||||||
[count],cl
|
[count],cl
|
||||||
[count],cr
|
|
||||||
[count],cb |NERDComAlignedComment|
|
[count],cb |NERDComAlignedComment|
|
||||||
Same as |NERDComComment| except that the delimiters are aligned down the
|
Same as |NERDComComment| except that the delimiters are aligned down the
|
||||||
left side (,cl), the right side (,cr) or both sides
|
left side (,cl) or both sides (,cb).
|
||||||
(,cb).
|
|
||||||
|
|
||||||
|
|
||||||
[count],cu |NERDComUncommentLine|
|
[count],cu |NERDComUncommentLine|
|
||||||
@@ -137,7 +125,7 @@ Uncomments the selected line(s).
|
|||||||
2.2.1 Comment map *NERDComComment*
|
2.2.1 Comment map *NERDComComment*
|
||||||
|
|
||||||
Default mapping: [count],cc
|
Default mapping: [count],cc
|
||||||
Change the mapping with: NERDComLineMap.
|
Mapped to: <plug>NERDCommenterComment
|
||||||
Applicable modes: normal visual visual-line visual-block.
|
Applicable modes: normal visual visual-line visual-block.
|
||||||
|
|
||||||
|
|
||||||
@@ -153,13 +141,13 @@ lines were selected in visual-line mode.
|
|||||||
2.2.2 Nested comment map *NERDComNestedComment*
|
2.2.2 Nested comment map *NERDComNestedComment*
|
||||||
|
|
||||||
Default mapping: [count],cn
|
Default mapping: [count],cn
|
||||||
Change the mapping with: NERDComLineNestMap.
|
Mapped to: <plug>NERDCommenterNest
|
||||||
Applicable modes: normal visual visual-line visual-block.
|
Applicable modes: normal visual visual-line visual-block.
|
||||||
|
|
||||||
Performs nested commenting. Works the same as ,cc except that if a
|
Performs nested commenting. Works the same as ,cc except that if a line is
|
||||||
line is already commented then it will be commented again.
|
already commented then it will be commented again.
|
||||||
|
|
||||||
If |NERDUsePlaceHolders| is set then the previous comment delimiters will
|
If |'NERDUsePlaceHolders'| is set then the previous comment delimiters will
|
||||||
be replaced by place-holder delimiters if needed. Otherwise the nested
|
be replaced by place-holder delimiters if needed. Otherwise the nested
|
||||||
comment will only be added if the current commenting delimiters have no right
|
comment will only be added if the current commenting delimiters have no right
|
||||||
delimiter (to avoid syntax errors)
|
delimiter (to avoid syntax errors)
|
||||||
@@ -168,13 +156,13 @@ If a [count] is given in normal mode, the mapping works as though that many
|
|||||||
lines were selected in visual-line mode.
|
lines were selected in visual-line mode.
|
||||||
|
|
||||||
Related options:
|
Related options:
|
||||||
|NERDDefaultNesting|
|
|'NERDDefaultNesting'|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
2.2.3 Toggle comment map *NERDComToggleComment*
|
2.2.3 Toggle comment map *NERDComToggleComment*
|
||||||
|
|
||||||
Default mapping: [count],c<space>
|
Default mapping: [count],c<space>
|
||||||
Change the mapping with: NERDComLineToggleMap.
|
Mapped to: <plug>NERDCommenterToggle
|
||||||
Applicable modes: normal visual-line.
|
Applicable modes: normal visual-line.
|
||||||
|
|
||||||
Toggles commenting of the lines selected. The behaviour of this mapping
|
Toggles commenting of the lines selected. The behaviour of this mapping
|
||||||
@@ -191,18 +179,18 @@ lines were selected in visual-line mode.
|
|||||||
2.2.4 Minimal comment map *NERDComMinimalComment*
|
2.2.4 Minimal comment map *NERDComMinimalComment*
|
||||||
|
|
||||||
Default mapping: [count],cm
|
Default mapping: [count],cm
|
||||||
Change the mapping with: NERDComLineMinimalMap
|
Mapped to: <plug>NERDCommenterMinimal
|
||||||
Applicable modes: normal visual-line.
|
Applicable modes: normal visual-line.
|
||||||
|
|
||||||
Comments the selected lines using one set of multipart delimiters if possible.
|
Comments the selected lines using one set of multipart delimiters if possible.
|
||||||
|
|
||||||
For example: if you are programming in c and you select 5 lines and press
|
For example: if you are programming in c and you select 5 lines and press ,cm
|
||||||
,cm then a '/*' will be placed at the start of the top line and a '*/'
|
then a '/*' will be placed at the start of the top line and a '*/' will be
|
||||||
will be placed at the end of the last line.
|
placed at the end of the last line.
|
||||||
|
|
||||||
Sets of multipart comment delimiters that are between the top and bottom
|
Sets of multipart comment delimiters that are between the top and bottom
|
||||||
selected lines are replaced with place holders (see |NERDLPlace|) if
|
selected lines are replaced with place holders (see |'NERDLPlace'|) if
|
||||||
|NERDUsePlaceHolders| is set for the current filetype. If it is not, then
|
|'NERDUsePlaceHolders'| is set for the current filetype. If it is not, then
|
||||||
the comment will be aborted if place holders are required to prevent illegal
|
the comment will be aborted if place holders are required to prevent illegal
|
||||||
syntax.
|
syntax.
|
||||||
|
|
||||||
@@ -213,7 +201,7 @@ lines were selected in visual-line mode.
|
|||||||
2.2.5 Invert comment map *NERDComInvertComment*
|
2.2.5 Invert comment map *NERDComInvertComment*
|
||||||
|
|
||||||
Default mapping: ,ci
|
Default mapping: ,ci
|
||||||
Change the mapping with: NERDComLineInvertMap.
|
Mapped to: <plug>NERDCommenterInvert
|
||||||
Applicable modes: normal visual-line.
|
Applicable modes: normal visual-line.
|
||||||
|
|
||||||
Inverts the commented state of each selected line. If the a selected line is
|
Inverts the commented state of each selected line. If the a selected line is
|
||||||
@@ -230,7 +218,7 @@ lines were selected in visual-line mode.
|
|||||||
2.2.6 Sexy comment map *NERDComSexyComment*
|
2.2.6 Sexy comment map *NERDComSexyComment*
|
||||||
|
|
||||||
Default mapping: [count],cs
|
Default mapping: [count],cs
|
||||||
Change the mapping with: NERDComLineSexyMap
|
Mapped to: <plug>NERDCommenterSexy
|
||||||
Applicable modes: normal, visual-line.
|
Applicable modes: normal, visual-line.
|
||||||
|
|
||||||
Comments the selected line(s) ``sexily''... see |NERDComSexyComments| for
|
Comments the selected line(s) ``sexily''... see |NERDComSexyComments| for
|
||||||
@@ -244,13 +232,13 @@ If a [count] is given in normal mode, the mapping works as though that many
|
|||||||
lines were selected in visual-line mode.
|
lines were selected in visual-line mode.
|
||||||
|
|
||||||
Related options:
|
Related options:
|
||||||
|NERDCompactSexyComs|
|
|'NERDCompactSexyComs'|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
2.2.7 Yank comment map *NERDComYankComment*
|
2.2.7 Yank comment map *NERDComYankComment*
|
||||||
|
|
||||||
Default mapping: [count],cy
|
Default mapping: [count],cy
|
||||||
Change the mapping with: NERDComLineYankMap
|
Mapped to: <plug>NERDCommenterYank
|
||||||
Applicable modes: normal visual visual-line visual-block.
|
Applicable modes: normal visual visual-line visual-block.
|
||||||
|
|
||||||
Same as ,cc except that it yanks the line(s) that are commented first.
|
Same as ,cc except that it yanks the line(s) that are commented first.
|
||||||
@@ -259,7 +247,7 @@ Same as ,cc except that it yanks the line(s) that are commented first.
|
|||||||
2.2.8 Comment to EOL map *NERDComEOLComment*
|
2.2.8 Comment to EOL map *NERDComEOLComment*
|
||||||
|
|
||||||
Default mapping: ,c$
|
Default mapping: ,c$
|
||||||
Change the mapping with: NERDComToEOLMap
|
Mapped to: <plug>NERDCommenterToEOL
|
||||||
Applicable modes: normal.
|
Applicable modes: normal.
|
||||||
|
|
||||||
Comments the current line from the current cursor position up to the end of
|
Comments the current line from the current cursor position up to the end of
|
||||||
@@ -269,37 +257,33 @@ the line.
|
|||||||
2.2.9 Append com to line map *NERDComAppendComment*
|
2.2.9 Append com to line map *NERDComAppendComment*
|
||||||
|
|
||||||
Default mapping: ,cA
|
Default mapping: ,cA
|
||||||
Change the mapping with: NERDAppendComMap.
|
Mapped to: <plug>NERDCommenterAppend
|
||||||
Applicable modes: normal.
|
Applicable modes: normal.
|
||||||
|
|
||||||
Appends comment delimiters to the end of the current line and goes
|
Appends comment delimiters to the end of the current line and goes
|
||||||
to insert mode between the new delimiters.
|
to insert mode between the new delimiters.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
2.2.10 Prepend com to line map *NERDComPrependComment*
|
2.2.10 Insert comment map *NERDComInsertComment*
|
||||||
|
|
||||||
Default mapping: ,cI
|
Default mapping: disabled by default.
|
||||||
Change the mapping with: NERDPrependComMap.
|
Map it to: <plug>NERDCommenterInInsert
|
||||||
Applicable modes: normal.
|
|
||||||
|
|
||||||
Prepends comment delimiters to the start of the current line and goes to
|
|
||||||
insert mode between the new delimiters.
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
2.2.11 Insert comment map *NERDComInsertComment*
|
|
||||||
|
|
||||||
Default mapping: <C-c>
|
|
||||||
Change the mapping with: NERDComInInsertMap.
|
|
||||||
Applicable modes: insert.
|
Applicable modes: insert.
|
||||||
|
|
||||||
Adds comment delimiters at the current cursor position and inserts
|
Adds comment delimiters at the current cursor position and inserts
|
||||||
between them.
|
between them.
|
||||||
|
|
||||||
|
NOTE: prior to version 2.1.17 this was mapped to ctrl-c. To restore this
|
||||||
|
mapping add >
|
||||||
|
let NERDComInsertMap='<c-c>'
|
||||||
|
<
|
||||||
|
to your vimrc.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
2.2.12 Use alternate delims map *NERDComAltDelim*
|
2.2.11 Use alternate delims map *NERDComAltDelim*
|
||||||
|
|
||||||
Default mapping: ,ca
|
Default mapping: ,ca
|
||||||
Change the mapping with: NERDAltComMap
|
Mapped to: <plug>NERDCommenterAltDelims
|
||||||
Applicable modes: normal.
|
Applicable modes: normal.
|
||||||
|
|
||||||
Changes to the alternative commenting style if one is available. For example,
|
Changes to the alternative commenting style if one is available. For example,
|
||||||
@@ -309,25 +293,25 @@ then they will be switched over to /**/ comments.
|
|||||||
See also |NERDComDefaultDelims|
|
See also |NERDComDefaultDelims|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
2.2.13 Comment aligned maps *NERDComAlignedComment*
|
2.2.12 Comment aligned maps *NERDComAlignedComment*
|
||||||
|
|
||||||
Default mappings: [count],cl [count],cr [count],cb
|
Default mappings: [count],cl [count],cb
|
||||||
Change the mappings with: NERDComAlignLeftMap, NERDComAlignRightMap and
|
Mapped to: <plug>NERDCommenterAlignLeft
|
||||||
NERDComAlignBothMap.
|
<plug>NERDCommenterAlignBoth
|
||||||
Applicable modes: normal visual-line.
|
Applicable modes: normal visual-line.
|
||||||
|
|
||||||
Same as ,cc except that the comment delimiters are aligned on the left
|
Same as ,cc except that the comment delimiters are aligned on the left side or
|
||||||
side, right side or both sides respectively. These comments are always nested
|
both sides respectively. These comments are always nested if the line(s) are
|
||||||
if the line(s) are already commented.
|
already commented.
|
||||||
|
|
||||||
If a [count] is given in normal mode, the mapping works as though that many
|
If a [count] is given in normal mode, the mapping works as though that many
|
||||||
lines were selected in visual-line mode.
|
lines were selected in visual-line mode.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
2.2.14 Uncomment line map *NERDComUncommentLine*
|
2.2.13 Uncomment line map *NERDComUncommentLine*
|
||||||
|
|
||||||
Default mapping: [count],cu
|
Default mapping: [count],cu
|
||||||
Change the mapping with: NERDUncomLineMap.
|
Mapped to: <plug>NERDCommenterUncomment
|
||||||
Applicable modes: normal visual visual-line visual-block.
|
Applicable modes: normal visual visual-line visual-block.
|
||||||
|
|
||||||
Uncomments the current line. If multiple lines are selected in
|
Uncomments the current line. If multiple lines are selected in
|
||||||
@@ -343,8 +327,8 @@ If a [count] is given in normal mode, the mapping works as though that many
|
|||||||
lines were selected in visual-line mode.
|
lines were selected in visual-line mode.
|
||||||
|
|
||||||
Related options:
|
Related options:
|
||||||
|NERDRemoveAltComs|
|
|'NERDRemoveAltComs'|
|
||||||
|NERDRemoveExtraSpaces|
|
|'NERDRemoveExtraSpaces'|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
2.3 Supported filetypes *NERDComFiletypes*
|
2.3 Supported filetypes *NERDComFiletypes*
|
||||||
@@ -393,8 +377,7 @@ one other marker symbol. For example: >
|
|||||||
* So there!
|
* So there!
|
||||||
* But this one is ``compact'' style */
|
* But this one is ``compact'' style */
|
||||||
<
|
<
|
||||||
Here the multipart delimiters are /* and */ and the marker is *. The NERD
|
Here the multipart delimiters are /* and */ and the marker is *.
|
||||||
commenter is capable of adding and removing comments of this type.
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
2.5 The NERDComment function *NERDComNERDComment*
|
2.5 The NERDComment function *NERDComNERDComment*
|
||||||
@@ -410,9 +393,9 @@ The arguments to this function are simple:
|
|||||||
boundries. If set to 0 then the function will operate on the current
|
boundries. If set to 0 then the function will operate on the current
|
||||||
line.
|
line.
|
||||||
- type: is used to specify what type of commenting operation is to be
|
- type: is used to specify what type of commenting operation is to be
|
||||||
performed, and it can be one of the following: 'sexy', 'invert',
|
performed, and it can be one of the following: "sexy", "invert",
|
||||||
'minimal', 'toggle', 'alignLeft', 'alignRight', 'alignBoth', 'norm',
|
"minimal", "toggle", "alignLeft", "alignBoth", "norm", "nested",
|
||||||
'nested', 'toEOL', 'prepend', 'append', 'insert', 'uncomment', 'yank'
|
"toEOL", "append", "insert", "uncomment", "yank"
|
||||||
|
|
||||||
For example, if you typed >
|
For example, if you typed >
|
||||||
:call NERDComment(1, 'sexy')
|
:call NERDComment(1, 'sexy')
|
||||||
@@ -426,41 +409,40 @@ then the script would do a sexy comment on the last visual selection.
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
3.1 Options summary *NERDComOptionsSummary*
|
3.1 Options summary *NERDComOptionsSummary*
|
||||||
|
|
||||||
|loaded_nerd_comments| Turns off the script.
|
|'loaded_nerd_comments'| Turns off the script.
|
||||||
|NERDAllowAnyVisualDelims| Allows multipart alternative delims to
|
|'NERDAllowAnyVisualDelims'| Allows multipart alternative delims to
|
||||||
be used when commenting in
|
be used when commenting in
|
||||||
visual/visual-block mode.
|
visual/visual-block mode.
|
||||||
|NERDBlockComIgnoreEmpty| Forces right delims to be placed when
|
|'NERDBlockComIgnoreEmpty'| Forces right delims to be placed when
|
||||||
doing visual-block comments.
|
doing visual-block comments.
|
||||||
|NERDCommentWholeLinesInVMode| Changes behaviour of visual comments.
|
|'NERDCommentWholeLinesInVMode'| Changes behaviour of visual comments.
|
||||||
|NERDDefaultNesting| Tells the script to use nested comments
|
|'NERDCreateDefaultMappings'| Turn the default mappings on/off.
|
||||||
|
|'NERDDefaultNesting'| Tells the script to use nested comments
|
||||||
by default.
|
by default.
|
||||||
|NERDMenuMode| Specifies how the NERD commenter menu
|
|'NERDMenuMode'| Specifies how the NERD commenter menu
|
||||||
will appear (if at all).
|
will appear (if at all).
|
||||||
|NERDLPlace| Specifies what to use as the left
|
|'NERDLPlace'| Specifies what to use as the left
|
||||||
delimiter placeholder when nesting
|
delimiter placeholder when nesting
|
||||||
comments.
|
comments.
|
||||||
|NERDMapleader| Specifies what all the commenting key
|
|'NERDUsePlaceHolders'| Specifies which filetypes may use
|
||||||
mappings will begin with.
|
|
||||||
|NERDUsePlaceHolders| Specifies which filetypes may use
|
|
||||||
placeholders when nesting comments.
|
placeholders when nesting comments.
|
||||||
|NERDRemoveAltComs| Tells the script whether to remove
|
|'NERDRemoveAltComs'| Tells the script whether to remove
|
||||||
alternative comment delimiters when
|
alternative comment delimiters when
|
||||||
uncommenting.
|
uncommenting.
|
||||||
|NERDRemoveExtraSpaces| Tells the script to always remove the
|
|'NERDRemoveExtraSpaces'| Tells the script to always remove the
|
||||||
extra spaces when uncommenting
|
extra spaces when uncommenting
|
||||||
(regardless of whether NERDSpaceDelims
|
(regardless of whether NERDSpaceDelims
|
||||||
is set)
|
is set)
|
||||||
|NERDRPlace| Specifies what to use as the right
|
|'NERDRPlace'| Specifies what to use as the right
|
||||||
delimiter placeholder when nesting
|
delimiter placeholder when nesting
|
||||||
comments.
|
comments.
|
||||||
|NERDShutUp| Stops "Unknown filetype" output from the
|
|'NERDShutUp'| Stops "Unknown filetype" output from the
|
||||||
script
|
script
|
||||||
|NERDSpaceDelims| Specifies whether to add extra spaces
|
|'NERDSpaceDelims'| Specifies whether to add extra spaces
|
||||||
around delimiters when commenting, and
|
around delimiters when commenting, and
|
||||||
whether to remove them when
|
whether to remove them when
|
||||||
uncommenting.
|
uncommenting.
|
||||||
|NERDCompactSexyComs| Specifies whether to use the compact
|
|'NERDCompactSexyComs'| Specifies whether to use the compact
|
||||||
style sexy comments.
|
style sexy comments.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
@@ -469,13 +451,13 @@ then the script would do a sexy comment on the last visual selection.
|
|||||||
To enable any of the below options you should put the given line in your
|
To enable any of the below options you should put the given line in your
|
||||||
~/.vimrc
|
~/.vimrc
|
||||||
|
|
||||||
*loaded_nerd_comments*
|
*'loaded_nerd_comments'*
|
||||||
If this script is driving you insane you can turn it off by setting this
|
If this script is driving you insane you can turn it off by setting this
|
||||||
option >
|
option >
|
||||||
let loaded_nerd_comments=1
|
let loaded_nerd_comments=1
|
||||||
<
|
<
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*NERDAllowAnyVisualDelims*
|
*'NERDAllowAnyVisualDelims'*
|
||||||
Values: 0 or 1.
|
Values: 0 or 1.
|
||||||
Default: 1.
|
Default: 1.
|
||||||
|
|
||||||
@@ -498,7 +480,7 @@ shown on the right: >
|
|||||||
System.out.println(foo * bar); System.out.println(foo * bar);
|
System.out.println(foo * bar); System.out.println(foo * bar);
|
||||||
<
|
<
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*NERDBlockComIgnoreEmpty*
|
*'NERDBlockComIgnoreEmpty'*
|
||||||
Values: 0 or 1.
|
Values: 0 or 1.
|
||||||
Default: 1.
|
Default: 1.
|
||||||
|
|
||||||
@@ -541,7 +523,7 @@ Otherwise, the code block would become: >
|
|||||||
/*} */
|
/*} */
|
||||||
<
|
<
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*NERDCommentWholeLinesInVMode*
|
*'NERDCommentWholeLinesInVMode'*
|
||||||
Values: 0, 1 or 2.
|
Values: 0, 1 or 2.
|
||||||
Default: 0.
|
Default: 0.
|
||||||
|
|
||||||
@@ -579,15 +561,25 @@ then stick the following line in your vimrc: >
|
|||||||
let NERDCommentWholeLinesInVMode=2
|
let NERDCommentWholeLinesInVMode=2
|
||||||
<
|
<
|
||||||
|
|
||||||
Note that this option does not affect the behaviour of |visual-block| mode.
|
Note that this option does not affect the behaviour of commenting in
|
||||||
|
|visual-block| mode.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*NERDRemoveAltComs*
|
*'NERDCreateDefaultMappings'*
|
||||||
|
Values: 0 or 1.
|
||||||
|
Default: 1.
|
||||||
|
|
||||||
|
If set to 0, none of the default mappings will be created.
|
||||||
|
|
||||||
|
See also |NERDComMappings|.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
*'NERDRemoveAltComs'*
|
||||||
Values: 0 or 1.
|
Values: 0 or 1.
|
||||||
Default: 1.
|
Default: 1.
|
||||||
|
|
||||||
When uncommenting a line (for a filetype with an alternative commenting style)
|
When uncommenting a line (for a filetype with an alternative commenting style)
|
||||||
this option tells the script whether to look for, and remove, comments
|
this option tells the script whether to look for, and remove, comment
|
||||||
delimiters of the alternative style.
|
delimiters of the alternative style.
|
||||||
|
|
||||||
For example, if you are editing a c++ file using // style comments and you go
|
For example, if you are editing a c++ file using // style comments and you go
|
||||||
@@ -597,13 +589,13 @@ For example, if you are editing a c++ file using // style comments and you go
|
|||||||
It will not be uncommented if the NERDRemoveAltComs is set to 0.
|
It will not be uncommented if the NERDRemoveAltComs is set to 0.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*NERDRemoveExtraSpaces*
|
*'NERDRemoveExtraSpaces'*
|
||||||
Values: 0 or 1.
|
Values: 0 or 1.
|
||||||
Default: 1.
|
Default: 1.
|
||||||
|
|
||||||
By default, the NERD commenter will remove spaces around comment delimiters if
|
By default, the NERD commenter will remove spaces around comment delimiters if
|
||||||
either:
|
either:
|
||||||
1. |NERDSpaceDelims| is set to 1.
|
1. |'NERDSpaceDelims'| is set to 1.
|
||||||
2. NERDRemoveExtraSpaces is set to 1.
|
2. NERDRemoveExtraSpaces is set to 1.
|
||||||
|
|
||||||
This means that if we have the following lines in a c code file: >
|
This means that if we have the following lines in a c code file: >
|
||||||
@@ -622,12 +614,12 @@ Otherwise they would become: >
|
|||||||
int bar = 10;
|
int bar = 10;
|
||||||
int baz = foo + bar
|
int baz = foo + bar
|
||||||
<
|
<
|
||||||
If you want the spaces to be removed only if |NERDSpaceDelims| is set then
|
If you want the spaces to be removed only if |'NERDSpaceDelims'| is set then
|
||||||
set NERDRemoveExtraSpaces to 0.
|
set NERDRemoveExtraSpaces to 0.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*NERDLPlace*
|
*'NERDLPlace'*
|
||||||
*NERDRPlace*
|
*'NERDRPlace'*
|
||||||
Values: arbitrary string.
|
Values: arbitrary string.
|
||||||
Default:
|
Default:
|
||||||
NERDLPlace: "[>"
|
NERDLPlace: "[>"
|
||||||
@@ -649,37 +641,7 @@ and we comment it with ,cn it will be changed to: >
|
|||||||
When we uncomment this line it will go back to what it was.
|
When we uncomment this line it will go back to what it was.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*NERDMapleader*
|
*'NERDMenuMode'*
|
||||||
Values: arbitrary string.
|
|
||||||
Default: \c
|
|
||||||
|
|
||||||
NERDMapleader is used to specify what all the NERD commenter key mappings
|
|
||||||
begin with.
|
|
||||||
|
|
||||||
The default key mappings will look like this: >
|
|
||||||
\cc
|
|
||||||
\cu
|
|
||||||
\ca
|
|
||||||
\ci
|
|
||||||
\cs
|
|
||||||
...
|
|
||||||
<
|
|
||||||
However, if this line: >
|
|
||||||
let NERDMapleader = ',x'
|
|
||||||
<
|
|
||||||
were present in your vimrc then the default mappings would look like this: >
|
|
||||||
,xc
|
|
||||||
,xu
|
|
||||||
,xa
|
|
||||||
,xi
|
|
||||||
,xs
|
|
||||||
...
|
|
||||||
<
|
|
||||||
This option only affects the mappings that have not been explicitly set
|
|
||||||
manually (see |NERDComMappings|).
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
*NERDMenuMode*
|
|
||||||
Values: 0, 1, 2, 3.
|
Values: 0, 1, 2, 3.
|
||||||
Default: 3
|
Default: 3
|
||||||
|
|
||||||
@@ -690,15 +652,15 @@ This option can take 4 values:
|
|||||||
"3": Turns the 'Plugin -> comment' menu on with <alt>-c as the shortcut.
|
"3": Turns the 'Plugin -> comment' menu on with <alt>-c as the shortcut.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*NERDUsePlaceHolders*
|
*'NERDUsePlaceHolders'*
|
||||||
Values: 0 or 1.
|
Values: 0 or 1.
|
||||||
Default 1.
|
Default 1.
|
||||||
|
|
||||||
This option is used to specify whether place-holder delimiters should be used
|
This option is used to specify whether place-holder delimiters should be used
|
||||||
when adding nested comments.
|
when creating a nested comment.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*NERDShutUp*
|
*'NERDShutUp'*
|
||||||
Values: 0 or 1.
|
Values: 0 or 1.
|
||||||
Default 1.
|
Default 1.
|
||||||
|
|
||||||
@@ -707,7 +669,7 @@ messages. Stick this line in your vimrc: >
|
|||||||
let NERDShutUp=1
|
let NERDShutUp=1
|
||||||
<
|
<
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*NERDSpaceDelims*
|
*'NERDSpaceDelims'*
|
||||||
Values: 0 or 1.
|
Values: 0 or 1.
|
||||||
Default 0.
|
Default 0.
|
||||||
|
|
||||||
@@ -720,10 +682,10 @@ as opposed to this: >
|
|||||||
<
|
<
|
||||||
If you want spaces to be added then set NERDSpaceDelims to 1 in your vimrc.
|
If you want spaces to be added then set NERDSpaceDelims to 1 in your vimrc.
|
||||||
|
|
||||||
See also |NERDRemoveExtraSpaces|.
|
See also |'NERDRemoveExtraSpaces'|.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*NERDCompactSexyComs*
|
*'NERDCompactSexyComs'*
|
||||||
Values: 0 or 1.
|
Values: 0 or 1.
|
||||||
Default 0.
|
Default 0.
|
||||||
|
|
||||||
@@ -742,20 +704,19 @@ As opposed to like this: >
|
|||||||
If this option is set to 1 then the top style will be used.
|
If this option is set to 1 then the top style will be used.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*NERDDefaultNesting*
|
*'NERDDefaultNesting'*
|
||||||
Values: 0 or 1.
|
Values: 0 or 1.
|
||||||
Default 1.
|
Default 1.
|
||||||
|
|
||||||
When this option is set to 1, comments are nested automatically. That is, if
|
When this option is set to 1, comments are nested automatically. That is, if
|
||||||
you hit ,cc on a line that is already commented it will be commented
|
you hit ,cc on a line that is already commented it will be commented again
|
||||||
again
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
3.3 Default delimiter customisation *NERDComDefaultDelims*
|
3.3 Default delimiter customisation *NERDComDefaultDelims*
|
||||||
|
|
||||||
If you want the NERD commenter to use the alternative delimiters for a
|
If you want the NERD commenter to use the alternative delimiters for a
|
||||||
specific filetype by default then put a line of this form into your vimrc: >
|
specific filetype by default then put a line of this form into your vimrc: >
|
||||||
let NERD_<&filetype>_alt_style=1
|
let NERD_<filetype>_alt_style=1
|
||||||
<
|
<
|
||||||
Example: java uses // style comments by default, but you want it to default to
|
Example: java uses // style comments by default, but you want it to default to
|
||||||
/* */ style comments instead. You would put this line in your vimrc: >
|
/* */ style comments instead. You would put this line in your vimrc: >
|
||||||
@@ -764,42 +725,27 @@ Example: java uses // style comments by default, but you want it to default to
|
|||||||
|
|
||||||
See |NERDComAltDelim| for switching commenting styles at runtime.
|
See |NERDComAltDelim| for switching commenting styles at runtime.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
==============================================================================
|
||||||
3.4 Key mapping customisation *NERDComMappings*
|
4. Key mapping customisation *NERDComMappings*
|
||||||
|
|
||||||
These options are used to override the default keys that are used for the
|
To change a mapping just map another key combo to the internal <plug> mapping.
|
||||||
commenting mappings. Their values must be set to strings. As an example: if
|
For example, to remap the |NERDComComment| mapping to ",omg" you would put
|
||||||
you wanted to use the mapping ,foo to uncomment lines of code then
|
this line in your vimrc: >
|
||||||
you would place this line in your vimrc >
|
map ,omg <plug>NERDCommenterComment
|
||||||
let NERDUncomLineMap=",foo"
|
|
||||||
<
|
<
|
||||||
Check out |NERDComFunctionality| for details about what the following
|
This will stop the corresponding default mappings from being created.
|
||||||
mappings do.
|
|
||||||
|
|
||||||
Default Mapping Option to override~
|
See the help for the mapping in question to see which <plug> mapping to
|
||||||
|
map to.
|
||||||
|
|
||||||
,ca NERDAltComMap
|
See also |'NERDCreateDefaultMappings'|.
|
||||||
,ce NERDAppendComMap
|
|
||||||
,cl NERDComAlignLeftMap
|
|
||||||
,cb NERDComAlignBothMap
|
|
||||||
,cr NERDComAlignRightMap
|
|
||||||
<C-c> NERDComInInsertMap
|
|
||||||
,ci NERDComLineInvertMap
|
|
||||||
,cc NERDComLineMap
|
|
||||||
,cn NERDComLineNestMap
|
|
||||||
,cs NERDComLineSexyMap
|
|
||||||
,c<space> NERDComLineToggleMap
|
|
||||||
,cm NERDComLineMinimalMap
|
|
||||||
,c$ NERDComToEOLMap
|
|
||||||
,cy NERDComLineYankMap
|
|
||||||
,cu NERDUncomLineMap
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
4. Issues with the script *NERDComIssues*
|
5. Issues with the script *NERDComIssues*
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
4.1 Delimiter detection heuristics *NERDComHeuristics*
|
5.1 Delimiter detection heuristics *NERDComHeuristics*
|
||||||
|
|
||||||
Heuristics are used to distinguish the real comment delimiters
|
Heuristics are used to distinguish the real comment delimiters
|
||||||
|
|
||||||
@@ -819,7 +765,7 @@ string. These heuristics, while usually pretty accurate, will not work for all
|
|||||||
cases.
|
cases.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
4.2 Nesting issues *NERDComNesting*
|
5.2 Nesting issues *NERDComNesting*
|
||||||
|
|
||||||
If we have some line of code like this: >
|
If we have some line of code like this: >
|
||||||
/*int foo */ = /*5 + 9;*/
|
/*int foo */ = /*5 + 9;*/
|
||||||
@@ -849,181 +795,48 @@ Drop him a line at martin_grenfell at msn.com. He would love to hear from you.
|
|||||||
its a lonely life being the worlds premier terror machine. How would you feel
|
its a lonely life being the worlds premier terror machine. How would you feel
|
||||||
if your face looked like a toaster and a t-rex put together? :(
|
if your face looked like a toaster and a t-rex put together? :(
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
7. TODO list *NERDComTodo*
|
|
||||||
|
|
||||||
Uncommenting of minimal comments needs to be more robust. Currently it is easy
|
|
||||||
to get illegal syntax when uncommenting them.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
8. Changelog *NERDComChangelog*
|
8. Changelog *NERDComChangelog*
|
||||||
|
|
||||||
2.1.8
|
2.2.1
|
||||||
- fixed a couple of bugs with the NERDSpaceDelims option, thx to
|
- add support for newlisp and clojure, thanks to Matthew Lee Hinman.
|
||||||
David Miani and Jeremy Hinegardner
|
- fix automake comments, thanks to Elias Pipping
|
||||||
- added dummy support for lhaskell, thx to pipp for posting the issue
|
- make haml comments default to -# with / as the alternative delimiter,
|
||||||
- added an alternative set of delims for the plsql filetype, thx to Kuchma
|
thanks to tpope
|
||||||
Michael
|
- add support for actionscript and processing thanks to Edwin Benavides
|
||||||
- added support for spectre, thx to Brett Warneke
|
- add support for ps1 (powershell), thanks to Jason Mills
|
||||||
- added support for scala, thx to Renald Buter
|
- add support for hostsaccess, thanks to Thomas Rowe
|
||||||
- added support for asymptote, thx to Vladimir Lomov
|
- add support for CVScommit
|
||||||
- made NERDDefaultNesting enabled by default as this seems more intuitive,
|
- add support for asciidoc, git and gitrebase. Thanks to Simon Ruderich.
|
||||||
thx to marco for the suggestion
|
- use # for gitcommit comments, thanks to Simon Ruderich.
|
||||||
|
- add support for mako and genshi, thanks to Keitheis.
|
||||||
|
- add support for conkyrc, thanks to David
|
||||||
|
- add support for SVNannotate, thanks to Miguel Jaque Barbero.
|
||||||
|
- add support for sieve, thanks to Stefan Walk
|
||||||
|
- add support for objj, thanks to Adam Thorsen.
|
||||||
|
|
||||||
|
2.2.0
|
||||||
2.1.7
|
- rewrote the mappings system to be more "standard".
|
||||||
- added support for haml, thx to Greb Weber
|
- removed all the mapping options. Now, mappings to <plug> mappings are
|
||||||
- added support for asterisk, thx to Laurent ARNOUD
|
used
|
||||||
- added support for objcpp, thx to Nicolas Weber
|
- see :help NERDComMappings, and :help NERDCreateDefaultMappings for
|
||||||
- added support for the factor filetype, thx to Aaron Schaefer
|
more info
|
||||||
- fixed a bug with the passwd filetype setup, thx to Yongwei Wu
|
- remove "prepend comments" and "right aligned comments".
|
||||||
- fixed a bug that was forcing filetypes with an alternative set of delims
|
- add support for applescript, calbire, man, SVNcommit, potwiki, txt2tags and SVNinfo.
|
||||||
to have at least one multipart set.
|
Thanks to nicothakis, timberke, sgronblo, mntnoe, Bernhard Grotz, John
|
||||||
- split out the help file out from the script and repackaged everything as
|
O'Shea, François and Giacomo Mariani respectively.
|
||||||
a zip
|
- bugfix for haskell delimiters. Thanks to mntnoe.
|
||||||
|
2.1.18
|
||||||
2.1.6
|
- add support for llvm. Thanks to nicothakis.
|
||||||
- added support for gentoo-conf-d thanks to tinoucas for posting the issue
|
- add support for xquery. Thanks to Phillip Kovalev.
|
||||||
and the patch
|
2.1.17
|
||||||
- added support for the D filetype. Thanks to Greg Weber for the email.
|
- fixed haskell delimiters (hackily). Thanks to Elias Pipping.
|
||||||
- added dummy support for cobol, cheers to timberke for posting the issue.
|
- add support for mailcap. Thanks to Pascal Brueckner.
|
||||||
- added support for velocity. Thanks to Bruce Sherrod for the email.
|
- add support for stata. Thanks to Jerónimo Carballo.
|
||||||
|
- applied a patch from ewfalor to fix an error in the help file with the
|
||||||
2.1.5
|
NERDMapleader doc
|
||||||
- added support for lilypond, bbx and lytex. Thanks to Eyolf Østrem for
|
- disable the insert mode ctrl-c mapping by default, see :help
|
||||||
the email.
|
NERDComInsertComment if you wish to restore it
|
||||||
- added an alterative set of delimiters for the dosbatch filetype, thanks
|
|
||||||
to Ingo Karkat for the email.
|
|
||||||
- added support for the markdown filetype. Thanks to Nicolas Weber for the
|
|
||||||
posting the issue.
|
|
||||||
|
|
||||||
2.1.4
|
|
||||||
- added support for the ahk filetype. Cheers to Don Hatlestad for the
|
|
||||||
email.
|
|
||||||
- added support for desktop and xsd filetypes. Thanks to Christophe Benz.
|
|
||||||
- added dummy support for Rails-log
|
|
||||||
- fixed a bunch of bugs in the comment delimiter setup process, thanks to
|
|
||||||
Cheng Fang for the email :D
|
|
||||||
- hardcore refactoring and removal of seldomly used, overly-complex
|
|
||||||
functionality.
|
|
||||||
- the script now requires vim 7
|
|
||||||
2.1.3
|
|
||||||
- fixed numerous bugs that were causing tabs to permanently be converted
|
|
||||||
to spaces, even if noexpandtab was set. Thanks to Heptite on #vim for
|
|
||||||
working with me to track them down :)
|
|
||||||
- added dummy support for "lookupfile". Thanks to David Fishburn for the
|
|
||||||
email.
|
|
||||||
- added support for "rst", thanks to Niels Aan de Brugh for the email.
|
|
||||||
|
|
||||||
2.1.2
|
|
||||||
- added support for the vera and ldif filetypes. Thanks to Normandie
|
|
||||||
Azucena and Florian Apolloner for the emails.
|
|
||||||
|
|
||||||
2.1.1
|
|
||||||
- added dummy support for SVNcommitlog and vcscommit. Thanks to John
|
|
||||||
O'Shea for the email.
|
|
||||||
- added support for Groovy. Thanks to Jason Mills for the email.
|
|
||||||
2.1.0
|
|
||||||
- now the script resets the delimiters when the filetype of the buffer
|
|
||||||
changes (thanks to James Hales for the patch)
|
|
||||||
- added formal support/doc for prepending a count to many of the
|
|
||||||
commenting maps so you can go, eg, 5,cc to comment 5 lines from normal
|
|
||||||
mode. Thanks again to James Hales for the patch.
|
|
||||||
- added support for the "gams" filetype that Jorge Rodrigues created.
|
|
||||||
- added support for the "objc" filetype, thanks to Rainer Müller for the
|
|
||||||
email.
|
|
||||||
- added support for the "sass" filetype that Dmitry Ilyashevich created.
|
|
||||||
|
|
||||||
2.0.7
|
|
||||||
- Added support for eclass and ebuild filetypes. Thanks to Alex Tarkovsky
|
|
||||||
for the email.
|
|
||||||
|
|
||||||
2.0.6
|
|
||||||
- Changed the default setting of NERDMapleader to ",c", meaning all the
|
|
||||||
maps now start with ,c instead of \c. This is to stop a major mapping
|
|
||||||
clash with the vcscommand plugin. Anyone wanting to keep the \c map
|
|
||||||
leader should read :help NERDMapleader.
|
|
||||||
- Added support for debcontrol and dummy support for debchangelog
|
|
||||||
filetypes, thanks to Stefano Zacchiroli for the email.
|
|
||||||
- Made it so that the NERDShutUp option now only controls the "Pleeease
|
|
||||||
email the delimiters..." requests. It no longer affects the general
|
|
||||||
output of the script.
|
|
||||||
- Simplified the names of the help tags.
|
|
||||||
|
|
||||||
2.0.5
|
|
||||||
- Added support for autoit, autohotkey and docbk filetypes (thanks to
|
|
||||||
Michael Böhler)
|
|
||||||
- Added support for cmake (thanks to Aaron Small)
|
|
||||||
- Added support for htmldjango and django filetypes (thanks to Ramiro
|
|
||||||
Morales)
|
|
||||||
- Improved the delimiters for eruby again
|
|
||||||
- Applied a patch from Seth Mason to fix some pathing issues with the help
|
|
||||||
file installation.
|
|
||||||
|
|
||||||
2.0.4
|
|
||||||
- Added support for verilog_systemverilog and systemverilog filetypes
|
|
||||||
(Thanks to Alexey for the email)
|
|
||||||
- Added support for fstab, thanks to Lizendir for the email.
|
|
||||||
- Added support for the smarty filetype.
|
|
||||||
- Improved the delimiters for eruby.
|
|
||||||
- Added dummy support for changelog filetype.
|
|
||||||
|
|
||||||
2.0.3
|
|
||||||
- Added dummy support for the csv filetype (thx to Mark Woodward for the
|
|
||||||
email)
|
|
||||||
- Added dummy support for vo_base and otl filetypes (thanks to fREW for
|
|
||||||
the email)
|
|
||||||
|
|
||||||
2.0.2:
|
|
||||||
- Minor bug fix that was stopping nested comments from working
|
|
||||||
|
|
||||||
2.0.1:
|
|
||||||
- Fixed the visual bell for the |NERDComToEOLMap| map.
|
|
||||||
- Added another possible value to the NERDMenuMode option which causes the
|
|
||||||
menu to be displayed under 'Plugin -> Comment'. See :h NERDMenuMode.
|
|
||||||
This new menu mode is now the default.
|
|
||||||
- Added support for the occam filetype (thanks to Anders for emailing me)
|
|
||||||
- Made the main commenting function (NERDComment) available outside the
|
|
||||||
script.
|
|
||||||
- bug fixes and refactoring
|
|
||||||
|
|
||||||
2.0.0:
|
|
||||||
- NOTE: renamed the script to NERD_commenter.vim. When you install this
|
|
||||||
version you must delete the old files: NERD_comments.vim and
|
|
||||||
NERD_comments.txt.
|
|
||||||
- Reworked the mappings and main entry point function for the script to
|
|
||||||
avoid causing visual-bells and screen scrolling.
|
|
||||||
- Changes to the script options (see |NERD_com-Customisation| for
|
|
||||||
details):
|
|
||||||
- They are all camel case now instead of underscored.
|
|
||||||
- Converted all of the regular expression options into simple boolean
|
|
||||||
options for simplicity.
|
|
||||||
- All the options are now stated positively, eg.
|
|
||||||
NERD_dont_remove_spaces_regexp has become NERDRemoveExtraSpaces.
|
|
||||||
- Some of the option names have been changed (other than in the above
|
|
||||||
ways)
|
|
||||||
- Some have been removed altogether, namely: NERD_create_h_filetype
|
|
||||||
(why was a commenting script creating a filetype?!),
|
|
||||||
NERD_left_align_regexp, NERD_right_align_regexp,
|
|
||||||
|
|
||||||
- Removed all the NERD_use_alt_style_XXX_coms options and replaced them
|
|
||||||
with a better system. Now if a filetype has alternative delims, the
|
|
||||||
script will check whether an option of the form
|
|
||||||
"NERD_<&filetype>_alt_style" exists, and if it does then alt delims will
|
|
||||||
be used. See |NERD_com-cust-delims| for details.
|
|
||||||
- The script no longer removes extra spaces for sexy comments for the
|
|
||||||
NERDRemoveExtraSpaces option (it will still remove spaces if
|
|
||||||
NERDSpaceDelims is set).
|
|
||||||
- Added dummy support for viminfo and rtf.
|
|
||||||
- Added support for the "gentoo-package-\(keywords\|mask\|use\)"
|
|
||||||
filetypes.
|
|
||||||
- Added '#' comments as an alternative for the asm filetype
|
|
||||||
|
|
||||||
Thanks to Markus Klinik and Anders for bug reports, and again to Anders
|
|
||||||
for his patch. Thanks to John O'Shea and fREW for the filetype
|
|
||||||
information.
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
8. Credits *NERDComCredits*
|
8. Credits *NERDComCredits*
|
||||||
@@ -1144,6 +957,23 @@ comments and the NERDSpaceDelims option.
|
|||||||
|
|
||||||
Thanks to marco for suggesting NERDDefaultNesting be set by default.
|
Thanks to marco for suggesting NERDDefaultNesting be set by default.
|
||||||
|
|
||||||
|
Thanks to Ingo Karkat for the bug reports and the bugfix patch.
|
||||||
|
|
||||||
|
Thanks to Zhang Shuhan for sending me a report about spaces not being removed
|
||||||
|
properly in some circumstances. Also, thanks for emailing me a bunch of bug
|
||||||
|
reports about sexy/toggle comments and for testing my fixes.
|
||||||
|
|
||||||
|
Thanks to tpope for the english lesson.
|
||||||
|
|
||||||
|
Thanks to Ben Schmidt, David Fishburn, and Erik Falor for emailing me about an
|
||||||
|
incompatibility with vim7.2. Thanks also to JaGoTerr for posting the issue.
|
||||||
|
|
||||||
|
Thanks to Elias Pipping for sending me a bug report about haskell commenting.
|
||||||
|
|
||||||
|
Thanks to mntnoe for pointing out incorrect delimiters for haskell.
|
||||||
|
|
||||||
|
Thanks to Mark S. for pointing out a bug in the doc.
|
||||||
|
|
||||||
Not to forget! Thanks to the following people for sending me new filetypes to
|
Not to forget! Thanks to the following people for sending me new filetypes to
|
||||||
support :D
|
support :D
|
||||||
|
|
||||||
@@ -1155,7 +985,7 @@ Michael Brunner kconfig
|
|||||||
Antono Vasiljev netdict
|
Antono Vasiljev netdict
|
||||||
Melissa Reid omlet
|
Melissa Reid omlet
|
||||||
Ilia N Ternovich quickfix
|
Ilia N Ternovich quickfix
|
||||||
John O'Shea RTF, SVNcommitlog and vcscommit
|
John O'Shea RTF, SVNcommitlog and vcscommit, SVNCommit
|
||||||
Anders occam
|
Anders occam
|
||||||
Mark Woodward csv
|
Mark Woodward csv
|
||||||
fREW gentoo-package-mask,
|
fREW gentoo-package-mask,
|
||||||
@@ -1166,11 +996,11 @@ Lizendir fstab
|
|||||||
Michael Böhler autoit, autohotkey and docbk
|
Michael Böhler autoit, autohotkey and docbk
|
||||||
Aaron Small cmake
|
Aaron Small cmake
|
||||||
Ramiro htmldjango and django
|
Ramiro htmldjango and django
|
||||||
Stefano Zacchiroli debcontrol and debchangelog
|
Stefano Zacchiroli debcontrol, debchangelog, mkd
|
||||||
Alex Tarkovsky ebuild and eclass
|
Alex Tarkovsky ebuild and eclass
|
||||||
Jorge Rodrigues gams
|
Jorge Rodrigues gams
|
||||||
Rainer Müller Objective C
|
Rainer Müller Objective C
|
||||||
Jason Mills Groovy
|
Jason Mills Groovy, ps1
|
||||||
Normandie Azucena vera
|
Normandie Azucena vera
|
||||||
Florian Apolloner ldif
|
Florian Apolloner ldif
|
||||||
David Fishburn lookupfile
|
David Fishburn lookupfile
|
||||||
@@ -1183,11 +1013,51 @@ Nicolas Weber markdown, objcpp
|
|||||||
tinoucas gentoo-conf-d
|
tinoucas gentoo-conf-d
|
||||||
Greg Weber D, haml
|
Greg Weber D, haml
|
||||||
Bruce Sherrod velocity
|
Bruce Sherrod velocity
|
||||||
timberke cobol
|
timberke cobol, calibre
|
||||||
Aaron Schaefer factor
|
Aaron Schaefer factor
|
||||||
Laurent ARNOUD asterisk
|
Mr X asterisk, mplayerconf
|
||||||
Kuchma Michael plsql
|
Kuchma Michael plsql
|
||||||
Brett Warneke spectre
|
Brett Warneke spectre
|
||||||
Pipp lhaskell
|
Pipp lhaskell
|
||||||
Renald Buter scala
|
Renald Buter scala
|
||||||
Vladimir Lomov asymptote
|
Vladimir Lomov asymptote
|
||||||
|
Marco mrxvtrc, aap
|
||||||
|
nicothakis SVNAnnotate, CVSAnnotate, SVKAnnotate,
|
||||||
|
SVNdiff, gitAnnotate, gitdiff, dtrace
|
||||||
|
llvm, applescript
|
||||||
|
Chen Xing Wikipedia
|
||||||
|
Jacobo Diaz dakota, patran
|
||||||
|
Li Jin gentoo-env-d, gentoo-init-d,
|
||||||
|
gentoo-make-conf, grub, modconf, sudoers
|
||||||
|
SpookeyPeanut rib
|
||||||
|
Greg Jandl pyrex/cython
|
||||||
|
Christophe Benz services, gitcommit
|
||||||
|
A Pontus vimperator
|
||||||
|
Stromnov slice, bzr
|
||||||
|
Martin Kustermann pamconf
|
||||||
|
Indriði Einarsson mason
|
||||||
|
Chris map
|
||||||
|
Krzysztof A. Adamski group
|
||||||
|
Pascal Brueckner mailcap
|
||||||
|
Jerónimo Carballo stata
|
||||||
|
Phillip Kovalev xquery
|
||||||
|
Bernhard Grotz potwiki
|
||||||
|
sgronblo man
|
||||||
|
François txt2tags
|
||||||
|
Giacomo Mariani SVNinfo
|
||||||
|
Matthew Lee Hinman newlisp, clojure
|
||||||
|
Elias Pipping automake
|
||||||
|
Edwin Benavides actionscript, processing
|
||||||
|
Thomas Rowe hostsaccess
|
||||||
|
Simon Ruderich asciidoc, git, gitcommit, gitrebase
|
||||||
|
Keitheis mako, genshi
|
||||||
|
David conkyrc
|
||||||
|
Miguel Jaque Barbero SVNannotate
|
||||||
|
Stefan Walk sieve
|
||||||
|
Adam Thorsen objj
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
9. License *NERDComLicense*
|
||||||
|
|
||||||
|
The NERD commenter is released under the wtfpl.
|
||||||
|
See http://sam.zoy.org/wtfpl/COPYING.
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user