mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-08 09:53:47 -05:00
Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
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
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
==============================================================================
|
||||
CONTENTS *NERDCommenterContents*
|
||||
CONTENTS *NERDCommenterContents*
|
||||
|
||||
1.Intro...................................|NERDCommenter|
|
||||
2.Functionality provided..................|NERDComFunctionality|
|
||||
@@ -16,8 +16,8 @@ CONTENTS *NERDCommenterContents*
|
||||
2.2 Functionality Details.............|NERDComFunctionalityDetails|
|
||||
2.2.1 Comment map.................|NERDComComment|
|
||||
2.2.2 Nested comment map..........|NERDComNestedComment|
|
||||
2.2.3 Toggle comment map..........|NERDComToggleComment|
|
||||
2.2.4 Minimal comment map.........|NERDComMinimalComment|
|
||||
2.2.3 Toggle comment map..........|NERDComToggleComment|
|
||||
2.2.4 Minimal comment map.........|NERDComMinimalComment|
|
||||
2.2.5 Invert comment map..........|NERDComInvertComment|
|
||||
2.2.6 Sexy comment map............|NERDComSexyComment|
|
||||
2.2.7 Yank comment map............|NERDComYankComment|
|
||||
@@ -40,9 +40,9 @@ CONTENTS *NERDCommenterContents*
|
||||
4.1 Delimiter detection heuristics....|NERDComHeuristics|
|
||||
4.2 Nesting issues....................|NERDComNesting|
|
||||
5.The author..............................|NERDComAuthor|
|
||||
6.TODO list...............................|NERDComTodo|
|
||||
7.Changelog...............................|NERDComChangelog|
|
||||
8.Credits.................................|NERDComCredits|
|
||||
6.Changelog...............................|NERDComChangelog|
|
||||
7.Credits.................................|NERDComCredits|
|
||||
8.License.................................|NERDComLicense|
|
||||
|
||||
==============================================================================
|
||||
1. Intro *NERDCommenter*
|
||||
@@ -66,30 +66,30 @@ provided that contains menu items corresponding to all the below mappings):
|
||||
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.
|
||||
|
||||
|
||||
[count],cn |NERDComNestedComment|
|
||||
[count],cn |NERDComNestedComment|
|
||||
Same as |NERDComComment| but forces nesting.
|
||||
|
||||
[count],c<space> |NERDComToggleComment|
|
||||
[count],c<space> |NERDComToggleComment|
|
||||
Toggles the comment state of the selected line(s). If the topmost selected
|
||||
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
|
||||
possible.
|
||||
possible.
|
||||
|
||||
|
||||
[count],ci |NERDComInvertComment|
|
||||
[count],ci |NERDComInvertComment|
|
||||
Toggles the comment state of the selected line(s) individually. Each selected
|
||||
line that is commented is uncommented and vice versa.
|
||||
|
||||
|
||||
[count],cs |NERDComSexyComment|
|
||||
Comments out the selected lines ``sexually''
|
||||
[count],cs |NERDComSexyComment|
|
||||
Comments out the selected lines ``sexily''
|
||||
|
||||
|
||||
[count],cy |NERDComYankComment|
|
||||
@@ -97,37 +97,38 @@ Same as |NERDComComment| except that the commented line(s) are yanked
|
||||
before commenting.
|
||||
|
||||
|
||||
,c$ |NERDComEOLComment|
|
||||
,c$ |NERDComEOLComment|
|
||||
Comments the current line from the cursor to the end of line.
|
||||
|
||||
|
||||
,cA |NERDComAppendComment|
|
||||
,cA |NERDComAppendComment|
|
||||
Adds comment delimiters to the end of line and goes into insert mode between
|
||||
them.
|
||||
|
||||
|
||||
,cI |NERDComPrependComment|
|
||||
,cI |NERDComPrependComment|
|
||||
Adds comment delimiters to the start of line and goes into insert mode between
|
||||
them.
|
||||
|
||||
|
||||
<C-c> |NERDComInsertComment|
|
||||
|NERDComInsertComment|
|
||||
Adds comment delimiters at the current cursor position and inserts between.
|
||||
Disabled by default.
|
||||
|
||||
|
||||
,ca |NERDComAltDelim|
|
||||
,ca |NERDComAltDelim|
|
||||
Switches to the alternative set of delimiters.
|
||||
|
||||
|
||||
[count],cl
|
||||
[count],cr
|
||||
[count],cb |NERDComAlignedComment|
|
||||
[count],cl
|
||||
[count],cr
|
||||
[count],cb |NERDComAlignedComment|
|
||||
Same as |NERDComComment| except that the delimiters are aligned down the
|
||||
left side (,cl), the right side (,cr) or both sides
|
||||
(,cb).
|
||||
|
||||
|
||||
[count],cu |NERDComUncommentLine|
|
||||
[count],cu |NERDComUncommentLine|
|
||||
Uncomments the selected line(s).
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
@@ -137,8 +138,8 @@ Uncomments the selected line(s).
|
||||
2.2.1 Comment map *NERDComComment*
|
||||
|
||||
Default mapping: [count],cc
|
||||
Change the mapping with: NERDComLineMap.
|
||||
Applicable modes: normal visual visual-line visual-block.
|
||||
Change the mapping with: NERDComLineMap.
|
||||
Applicable modes: normal visual visual-line visual-block.
|
||||
|
||||
|
||||
Comments out the current line. If multiple lines are selected in visual-line
|
||||
@@ -157,12 +158,12 @@ Change the mapping with: NERDComLineNestMap.
|
||||
Applicable modes: normal visual visual-line visual-block.
|
||||
|
||||
Performs nested commenting. Works the same as ,cc except that if a
|
||||
line is already commented then it will be commented again.
|
||||
line is already commented then it will be commented again.
|
||||
|
||||
If |NERDUsePlaceHolders| is set then the previous comment delimiters will
|
||||
be replaced by place-holder delimiters if needed. Otherwise the nested
|
||||
comment will only be added if the current commenting delimiters have no right
|
||||
delimiter (to avoid syntax errors)
|
||||
delimiter (to avoid syntax errors)
|
||||
|
||||
If a [count] is given in normal mode, the mapping works as though that many
|
||||
lines were selected in visual-line mode.
|
||||
@@ -171,15 +172,15 @@ Related options:
|
||||
|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.
|
||||
Applicable modes: normal visual-line.
|
||||
|
||||
Toggles commenting of the lines selected. The behaviour of this mapping
|
||||
depends on whether the first line selected is commented or not. If so, all
|
||||
selected lines are uncommented and vice versa.
|
||||
selected lines are uncommented and vice versa.
|
||||
|
||||
With this mapping, a line is only considered to be commented if it starts with
|
||||
a left delimiter.
|
||||
@@ -188,7 +189,7 @@ If a [count] is given in normal mode, the mapping works as though that many
|
||||
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
|
||||
Change the mapping with: NERDComLineMinimalMap
|
||||
@@ -212,13 +213,13 @@ lines were selected in visual-line mode.
|
||||
------------------------------------------------------------------------------
|
||||
2.2.5 Invert comment map *NERDComInvertComment*
|
||||
|
||||
Default mapping: ,ci
|
||||
Default mapping: ,ci
|
||||
Change the mapping with: NERDComLineInvertMap.
|
||||
Applicable modes: normal visual-line.
|
||||
|
||||
Inverts the commented state of each selected line. If the a selected line is
|
||||
commented then it is uncommented and vice versa. Each line is examined and
|
||||
commented/uncommented individually.
|
||||
commented/uncommented individually.
|
||||
|
||||
With this mapping, a line is only considered to be commented if it starts with
|
||||
a left delimiter.
|
||||
@@ -229,13 +230,13 @@ lines were selected in visual-line mode.
|
||||
------------------------------------------------------------------------------
|
||||
2.2.6 Sexy comment map *NERDComSexyComment*
|
||||
|
||||
Default mapping: [count],cs
|
||||
Default mapping: [count],cs
|
||||
Change the mapping with: NERDComLineSexyMap
|
||||
Applicable modes: normal, visual-line.
|
||||
|
||||
Comments the selected line(s) ``sexily''... see |NERDComSexyComments| for
|
||||
a description of what sexy comments are. Can only be done on filetypes for
|
||||
which there is at least one set of multipart comment delimiters specified.
|
||||
which there is at least one set of multipart comment delimiters specified.
|
||||
|
||||
Sexy comments cannot be nested and lines inside a sexy comment cannot be
|
||||
commented again.
|
||||
@@ -249,31 +250,31 @@ Related options:
|
||||
------------------------------------------------------------------------------
|
||||
2.2.7 Yank comment map *NERDComYankComment*
|
||||
|
||||
Default mapping: [count],cy
|
||||
Default mapping: [count],cy
|
||||
Change the mapping with: NERDComLineYankMap
|
||||
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.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2.2.8 Comment to EOL map *NERDComEOLComment*
|
||||
|
||||
Default mapping: ,c$
|
||||
Change the mapping with: NERDComToEOLMap
|
||||
Default mapping: ,c$
|
||||
Change the mapping with: NERDComToEOLMap
|
||||
Applicable modes: normal.
|
||||
|
||||
Comments the current line from the current cursor position up to the end of
|
||||
the line.
|
||||
the line.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2.2.9 Append com to line map *NERDComAppendComment*
|
||||
|
||||
Default mapping: ,cA
|
||||
Change the mapping with: NERDAppendComMap.
|
||||
Default mapping: ,cA
|
||||
Change the mapping with: NERDAppendComMap.
|
||||
Applicable modes: normal.
|
||||
|
||||
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*
|
||||
@@ -283,17 +284,23 @@ Change the mapping with: NERDPrependComMap.
|
||||
Applicable modes: normal.
|
||||
|
||||
Prepends comment delimiters to the start of the current line and goes to
|
||||
insert mode between the new delimiters.
|
||||
insert mode between the new delimiters.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2.2.11 Insert comment map *NERDComInsertComment*
|
||||
|
||||
Default mapping: <C-c>
|
||||
Change the mapping with: NERDComInInsertMap.
|
||||
Default mapping: disabled by default.
|
||||
Change the mapping with: NERDComInInsertMap.
|
||||
Applicable modes: insert.
|
||||
|
||||
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*
|
||||
@@ -304,21 +311,21 @@ Applicable modes: normal.
|
||||
|
||||
Changes to the alternative commenting style if one is available. For example,
|
||||
if the user is editing a c++ file using // comments and they hit ,ca
|
||||
then they will be switched over to /**/ comments.
|
||||
then they will be switched over to /**/ comments.
|
||||
|
||||
See also |NERDComDefaultDelims|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2.2.13 Comment aligned maps *NERDComAlignedComment*
|
||||
|
||||
Default mappings: [count],cl [count],cr [count],cb
|
||||
Default mappings: [count],cl [count],cr [count],cb
|
||||
Change the mappings with: NERDComAlignLeftMap, NERDComAlignRightMap and
|
||||
NERDComAlignBothMap.
|
||||
Applicable modes: normal visual-line.
|
||||
|
||||
Same as ,cc except that the comment delimiters are aligned on the left
|
||||
side, right side or both sides respectively. These comments are always nested
|
||||
if the line(s) are already commented.
|
||||
if the line(s) are already commented.
|
||||
|
||||
If a [count] is given in normal mode, the mapping works as though that many
|
||||
lines were selected in visual-line mode.
|
||||
@@ -326,7 +333,7 @@ lines were selected in visual-line mode.
|
||||
------------------------------------------------------------------------------
|
||||
2.2.14 Uncomment line map *NERDComUncommentLine*
|
||||
|
||||
Default mapping: [count],cu
|
||||
Default mapping: [count],cu
|
||||
Change the mapping with: NERDUncomLineMap.
|
||||
Applicable modes: normal visual visual-line visual-block.
|
||||
|
||||
@@ -375,7 +382,7 @@ strace svn systemverilog tads taglist tags tak tasm tcl terminfo tex text
|
||||
plaintex texinfo texmf tf tidy tli trasys tsalt tsscl tssgm uc uil vb verilog
|
||||
verilog_systemverilog vgrindefs vhdl vim viminfo virata vo_base vrml vsejcl
|
||||
webmacro wget winbatch wml wvdial xdefaults xf86conf xhtml xkb xmath xml
|
||||
xmodmap xpm2 xpm xslt yacc yaml z8a
|
||||
xmodmap xpm2 xpm xslt yacc yaml z8a
|
||||
|
||||
If a language is not in the list of hardcoded supported filetypes then the
|
||||
&commentstring vim option is used.
|
||||
@@ -390,7 +397,7 @@ one other marker symbol. For example: >
|
||||
*/
|
||||
|
||||
/* This is a c style sexy comment
|
||||
* So there!
|
||||
* So there!
|
||||
* But this one is ``compact'' style */
|
||||
<
|
||||
Here the multipart delimiters are /* and */ and the marker is *. The NERD
|
||||
@@ -402,9 +409,9 @@ commenter is capable of adding and removing comments of this type.
|
||||
All of the NERD commenter mappings and menu items invoke a single function
|
||||
which delegates the commenting work to other functions. This function is
|
||||
public and has the prototype: >
|
||||
function! NERDComment(isVisual, type)
|
||||
function! NERDComment(isVisual, type)
|
||||
<
|
||||
The arguments to this function are simple:
|
||||
The arguments to this function are simple:
|
||||
- isVisual: if you wish to do any kind of visual comment then set this to
|
||||
1 and the function will use the '< and '> marks to find the comment
|
||||
boundries. If set to 0 then the function will operate on the current
|
||||
@@ -418,7 +425,7 @@ For example, if you typed >
|
||||
:call NERDComment(1, 'sexy')
|
||||
<
|
||||
then the script would do a sexy comment on the last visual selection.
|
||||
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. Options *NERDComOptions*
|
||||
@@ -450,7 +457,7 @@ then the script would do a sexy comment on the last visual selection.
|
||||
|NERDRemoveExtraSpaces| Tells the script to always remove the
|
||||
extra spaces when uncommenting
|
||||
(regardless of whether NERDSpaceDelims
|
||||
is set)
|
||||
is set)
|
||||
|NERDRPlace| Specifies what to use as the right
|
||||
delimiter placeholder when nesting
|
||||
comments.
|
||||
@@ -466,7 +473,7 @@ then the script would do a sexy comment on the last visual selection.
|
||||
------------------------------------------------------------------------------
|
||||
3.3 Options details *NERDComOptionsDetails*
|
||||
|
||||
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
|
||||
|
||||
*loaded_nerd_comments*
|
||||
@@ -476,7 +483,7 @@ option >
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*NERDAllowAnyVisualDelims*
|
||||
Values: 0 or 1.
|
||||
Values: 0 or 1.
|
||||
Default: 1.
|
||||
|
||||
If set to 1 then, when doing a visual or visual-block comment (but not a
|
||||
@@ -489,7 +496,7 @@ example if we are editing the following java code: >
|
||||
System.out.println(foo * bar);
|
||||
<
|
||||
If we are using // comments and select the "foo" and "bar" in visual-block
|
||||
mode, as shown left below (where '|'s are used to represent the visual-block
|
||||
mode, as shown left below (where '|'s are used to represent the visual-block
|
||||
boundary), and comment it then the script will use the alternative delims as
|
||||
shown on the right: >
|
||||
|
||||
@@ -499,7 +506,7 @@ shown on the right: >
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*NERDBlockComIgnoreEmpty*
|
||||
Values: 0 or 1.
|
||||
Values: 0 or 1.
|
||||
Default: 1.
|
||||
|
||||
This option affects visual-block mode commenting. If this option is turned
|
||||
@@ -516,7 +523,7 @@ For example, if you are commenting this chunk of c code in visual-block mode
|
||||
| | while(1){
|
||||
| | fork();
|
||||
| | }
|
||||
|} |
|
||||
|} |
|
||||
<
|
||||
If NERDBlockComIgnoreEmpty=0 then this code will become: >
|
||||
#include <sys/types.h>
|
||||
@@ -527,7 +534,7 @@ If NERDBlockComIgnoreEmpty=0 then this code will become: >
|
||||
/* */ while(1){
|
||||
/* */ fork();
|
||||
/* */ }
|
||||
/*} */
|
||||
/*} */
|
||||
<
|
||||
Otherwise, the code block would become: >
|
||||
#include <sys/types.h>
|
||||
@@ -538,7 +545,7 @@ Otherwise, the code block would become: >
|
||||
while(1){
|
||||
fork();
|
||||
}
|
||||
/*} */
|
||||
/*} */
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*NERDCommentWholeLinesInVMode*
|
||||
@@ -629,7 +636,7 @@ set NERDRemoveExtraSpaces to 0.
|
||||
*NERDLPlace*
|
||||
*NERDRPlace*
|
||||
Values: arbitrary string.
|
||||
Default:
|
||||
Default:
|
||||
NERDLPlace: "[>"
|
||||
NERDRPlace: "<]"
|
||||
|
||||
@@ -637,8 +644,8 @@ These options are used to control the strings used as place-holder delimiters.
|
||||
Place holder delimiters are used when performing nested commenting when the
|
||||
filetype supports commenting styles with both left and right delimiters.
|
||||
To set these options use lines like: >
|
||||
let NERDLPlace="FOO"
|
||||
let NERDRPlace="BAR"
|
||||
let NERDLPlace="FOO"
|
||||
let NERDRPlace="BAR"
|
||||
<
|
||||
Following the above example, if we have line of c code: >
|
||||
/* int horse */
|
||||
@@ -651,17 +658,17 @@ When we uncomment this line it will go back to what it was.
|
||||
------------------------------------------------------------------------------
|
||||
*NERDMapleader*
|
||||
Values: arbitrary string.
|
||||
Default: \c
|
||||
Default: ,c
|
||||
|
||||
NERDMapleader is used to specify what all the NERD commenter key mappings
|
||||
begin with.
|
||||
begin with.
|
||||
|
||||
The default key mappings will look like this: >
|
||||
\cc
|
||||
\cu
|
||||
\ca
|
||||
\ci
|
||||
\cs
|
||||
,cc
|
||||
,cu
|
||||
,ca
|
||||
,ci
|
||||
,cs
|
||||
...
|
||||
<
|
||||
However, if this line: >
|
||||
@@ -688,7 +695,7 @@ This option can take 4 values:
|
||||
"1": Turns the 'comment' menu on with no menu shortcut.
|
||||
"2": Turns the 'comment 'menu on with <alt>-c as the shortcut.
|
||||
"3": Turns the 'Plugin -> comment' menu on with <alt>-c as the shortcut.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*NERDUsePlaceHolders*
|
||||
Values: 0 or 1.
|
||||
@@ -733,10 +740,10 @@ Some people may want their sexy comments to be like this: >
|
||||
* in c */
|
||||
<
|
||||
As opposed to like this: >
|
||||
/*
|
||||
/*
|
||||
* Hi There!
|
||||
* This is a sexy comment
|
||||
* in c
|
||||
* in c
|
||||
*/
|
||||
<
|
||||
If this option is set to 1 then the top style will be used.
|
||||
@@ -769,11 +776,11 @@ See |NERDComAltDelim| for switching commenting styles at runtime.
|
||||
|
||||
These options are used to override the default keys that are used for the
|
||||
commenting mappings. Their values must be set to strings. As an example: if
|
||||
you wanted to use the mapping ,foo to uncomment lines of code then
|
||||
you wanted to use the mapping ,foo to uncomment lines of code then
|
||||
you would place this line in your vimrc >
|
||||
let NERDUncomLineMap=",foo"
|
||||
<
|
||||
Check out |NERDComFunctionality| for details about what the following
|
||||
Check out |NERDComFunctionality| for details about what the following
|
||||
mappings do.
|
||||
|
||||
Default Mapping Option to override~
|
||||
@@ -793,7 +800,7 @@ Default Mapping Option to override~
|
||||
,c$ NERDComToEOLMap
|
||||
,cy NERDComLineYankMap
|
||||
,cu NERDUncomLineMap
|
||||
|
||||
|
||||
==============================================================================
|
||||
4. Issues with the script *NERDComIssues*
|
||||
|
||||
@@ -809,7 +816,7 @@ delimiters appear in a line doesnt mean they really ARE delimiters. For
|
||||
example, Java uses // comments but the line >
|
||||
System.out.println("//");
|
||||
<
|
||||
clearly contains no real comment delimiters.
|
||||
clearly contains no real comment delimiters.
|
||||
|
||||
To distinguish between ``real'' comment delimiters and ``fake'' ones we use a
|
||||
set of heuristics. For example, one such heuristic states that any comment
|
||||
@@ -839,7 +846,7 @@ will become: >
|
||||
for simplicity)
|
||||
|
||||
==============================================================================
|
||||
6. The author *NERDComAuthor*
|
||||
5. The author *NERDComAuthor*
|
||||
|
||||
The author of the NERD commenter is Martyzillatron --- the half robot, half
|
||||
dinosaur bastard son of Megatron and Godzilla. He enjoys destroying
|
||||
@@ -850,15 +857,57 @@ 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? :(
|
||||
|
||||
==============================================================================
|
||||
7. TODO list *NERDComTodo*
|
||||
7. Changelog *NERDComChangelog*
|
||||
|
||||
Uncommenting of minimal comments needs to be more robust. Currently it is easy
|
||||
to get illegal syntax when uncommenting them.
|
||||
2.1.18
|
||||
- add support for llvm. Thanks to nicothakis.
|
||||
- add support for xquery. Thanks to Phillip Kovalev.
|
||||
2.1.17
|
||||
- fixed haskell delimiters (hackily). Thanks to Elias Pipping.
|
||||
- add support for mailcap. Thanks to Pascal Brueckner.
|
||||
- add support for stata. Thanks to Jerónimo Carballo.
|
||||
- applied a patch from ewfalor to fix an error in the help file with the
|
||||
NERDMapleader doc
|
||||
- disable the insert mode ctrl-c mapping by default, see :help
|
||||
NERDComInsertComment if you wish to restore it
|
||||
|
||||
2.1.16
|
||||
- compatibility fix for vim7.2, cheers to Ben Schmidt, David Fishburn, and
|
||||
Erik Falor for the emails, and to JaGoTerr for posting the issue.
|
||||
|
||||
2.1.15
|
||||
- added pamconf support, thanks to Martin Kustermann
|
||||
- added mason support, thanks to Indriði Einarsson
|
||||
- added map support, thanks to Chris
|
||||
- added bzr support, thanks to Stromnov
|
||||
- added group support, thanks to Krzysztof A. Adamski
|
||||
- change license to wtfpl
|
||||
|
||||
==============================================================================
|
||||
8. Changelog *NERDComChangelog*
|
||||
2.1.14
|
||||
- added support for gitconfig, tar, nerdtree
|
||||
- added support for dtrace, thanks to nicothakis for the post
|
||||
2.1.13
|
||||
- added support for rib, pyrex/cython, liquid, services, gitcommit,
|
||||
vimperator, and slice. Thanks to spookypeanut, Greg Jandl, Christophe
|
||||
Benz, A Pontus, and Stromnov for emailing me and/or posting issues.
|
||||
- set the NERDRemoveExtraSpaces option to 1 by default as the doc states
|
||||
- other fixes: (thanks to Zhang Shuhan for all his emails and testing)
|
||||
* made the sexy comment mapping fall back to normal commenting if sexy
|
||||
comments arent possible for the current filetype
|
||||
* fixed some bugs with sexy comments
|
||||
* made the uncommenting side of toggle comments slightly more robust
|
||||
* fixed a bug where some extra spaces werent being removed (although
|
||||
the currect options were set)
|
||||
2.1.12
|
||||
- added support for patran and dakota, thx to Jacobo Diaz for the email
|
||||
- added support for gentoo-env-d, gentoo-init-d, gentoo-make-conf, grub,
|
||||
modconf and sudoers filetypes, thx to Li Jin for the patch.
|
||||
- added support for SVNdiff, gitAnnotate, gitdiff. Thx to nicothakis for
|
||||
posting the issue
|
||||
|
||||
2.1.11
|
||||
- fixed a bug with the selection option and visual commenting (again).
|
||||
Thanks to Ingo Karkat (again).
|
||||
|
||||
2.1.10
|
||||
- added support for Wikipedia (thanks to Chen Xing)
|
||||
@@ -872,7 +921,7 @@ to get illegal syntax when uncommenting them.
|
||||
nicothakis for posting the issue
|
||||
|
||||
2.1.8
|
||||
- fixed a couple of bugs with the NERDSpaceDelims option, thx to
|
||||
- fixed a couple of bugs with the NERDSpaceDelims option, thx to
|
||||
David Miani and Jeremy Hinegardner
|
||||
- added dummy support for lhaskell, thx to pipp for posting the issue
|
||||
- added an alternative set of delims for the plsql filetype, thx to Kuchma
|
||||
@@ -882,7 +931,7 @@ to get illegal syntax when uncommenting them.
|
||||
- added support for asymptote, thx to Vladimir Lomov
|
||||
- made NERDDefaultNesting enabled by default as this seems more intuitive,
|
||||
thx to marco for the suggestion
|
||||
|
||||
|
||||
|
||||
2.1.7
|
||||
- added support for haml, thx to Greb Weber
|
||||
@@ -961,7 +1010,7 @@ to get illegal syntax when uncommenting them.
|
||||
- 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.
|
||||
- Simplified the names of the help tags.
|
||||
|
||||
2.0.5
|
||||
- Added support for autoit, autohotkey and docbk filetypes (thanks to
|
||||
@@ -1002,7 +1051,7 @@ to get illegal syntax when uncommenting them.
|
||||
|
||||
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
|
||||
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.
|
||||
@@ -1017,7 +1066,7 @@ to get illegal syntax when uncommenting them.
|
||||
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,
|
||||
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
|
||||
@@ -1032,31 +1081,31 @@ to get illegal syntax when uncommenting them.
|
||||
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.
|
||||
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*
|
||||
7. Credits *NERDComCredits*
|
||||
|
||||
Thanks and respect to the following people:
|
||||
|
||||
Thanks to Nick Brettell for his many ideas and criticisms. A bloody good
|
||||
bastard.
|
||||
bastard.
|
||||
:normal :.-2s/good//
|
||||
|
||||
Thanks to Matthew Hawkins for his awesome refactoring!
|
||||
|
||||
Thanks to the authors of the vimspell whose documentation
|
||||
Thanks to the authors of the vimspell whose documentation
|
||||
installation function I stole :)
|
||||
|
||||
Thanks to Greg Searle for the idea of using place-holders for nested comments.
|
||||
|
||||
Thanks to Nguyen for the suggestions and pointing the h file highlighting bug!
|
||||
Also, thanks for the idea of doing sexy comments as well as his suggestions
|
||||
relating to it :P
|
||||
Thanks again to Nguyen for complaining about the NERD_comments menu mapping
|
||||
(<Alt>-c) interfering with another mapping of his... and thus the
|
||||
relating to it :P
|
||||
Thanks again to Nguyen for complaining about the NERD_comments menu mapping
|
||||
(<Alt>-c) interfering with another mapping of his... and thus the
|
||||
NERD_dont_create_menu_shortcut option was born :P
|
||||
(it was then replaced with NERD_menu_mode in version 1.67 :)
|
||||
|
||||
@@ -1110,7 +1159,7 @@ sexy comments. Sexy comments dont look so sexy when they are only half removed
|
||||
|
||||
Thanks to Alexander "boesi" Bosecke for pointing out a bug that was stopping
|
||||
the NERD_space_delim_filetype_regexp option from working with left aligned
|
||||
toggle comments. And for pointing out a bug when initialising VB comments.
|
||||
toggle comments. And for pointing out a bug when initialising VB comments.
|
||||
|
||||
Thanks to Stefano Zacchiroli for suggesting the idea of "Minimal comments".
|
||||
And for suggested improvements to minimal comments.
|
||||
@@ -1157,6 +1206,17 @@ 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.
|
||||
|
||||
Not to forget! Thanks to the following people for sending me new filetypes to
|
||||
support :D
|
||||
|
||||
@@ -1197,7 +1257,7 @@ tinoucas gentoo-conf-d
|
||||
Greg Weber D, haml
|
||||
Bruce Sherrod velocity
|
||||
timberke cobol
|
||||
Aaron Schaefer factor
|
||||
Aaron Schaefer factor
|
||||
Laurent ARNOUD asterisk, mplayerconf
|
||||
Kuchma Michael plsql
|
||||
Brett Warneke spectre
|
||||
@@ -1205,5 +1265,28 @@ Pipp lhaskell
|
||||
Renald Buter scala
|
||||
Vladimir Lomov asymptote
|
||||
Marco mrxvtrc, aap
|
||||
nicothakis SVNAnnotate, CVSAnnotate, SVKAnnotate
|
||||
nicothakis SVNAnnotate, CVSAnnotate, SVKAnnotate,
|
||||
SVNdiff, gitAnnotate, gitdiff, dtrace
|
||||
llvm
|
||||
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
|
||||
|
||||
==============================================================================
|
||||
8. 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