diff --git a/doc/NERD_commenter.txt b/doc/NERD_commenter.txt index d79d278..a469631 100644 --- a/doc/NERD_commenter.txt +++ b/doc/NERD_commenter.txt @@ -62,40 +62,40 @@ taste. The following key mappings are provided by default (there is also a menu with items corresponding to all the mappings below): -[count],cc |NERDComComment| +[count]cc |NERDComComment| Comment out the current line or text selected in visual mode. -[count],cn |NERDComNestedComment| -Same as ,cc but forces nesting. +[count]cn |NERDComNestedComment| +Same as cc but forces nesting. -[count],c |NERDComToggleComment| +[count]c |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. -[count],ci |NERDComInvertComment| +[count]ci |NERDComInvertComment| Toggles the comment state of the selected line(s) individually. -[count],cs |NERDComSexyComment| +[count]cs |NERDComSexyComment| Comments out the selected lines ``sexily'' -[count],cy |NERDComYankComment| -Same as ,cc except that the commented line(s) are yanked first. +[count]cy |NERDComYankComment| +Same as cc except that the commented line(s) are yanked first. -,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. @@ -105,17 +105,17 @@ 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],cb |NERDComAlignedComment| +[count]cl +[count]cb |NERDComAlignedComment| Same as |NERDComComment| except that the delimiters are aligned down the -left side (,cl) or both sides (,cb). +left side (cl) or both sides (cb). -[count],cu |NERDComUncommentLine| +[count]cu |NERDComUncommentLine| Uncomments the selected line(s). ------------------------------------------------------------------------------ @@ -124,7 +124,7 @@ Uncomments the selected line(s). ------------------------------------------------------------------------------ 2.2.1 Comment map *NERDComComment* -Default mapping: [count],cc +Default mapping: [count]cc Mapped to: NERDCommenterComment Applicable modes: normal visual visual-line visual-block. @@ -140,12 +140,12 @@ lines were selected in visual-line mode. ------------------------------------------------------------------------------ 2.2.2 Nested comment map *NERDComNestedComment* -Default mapping: [count],cn +Default mapping: [count]cn Mapped to: NERDCommenterNest 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. +Performs nested commenting. Works the same as cc except that if a 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 @@ -161,7 +161,7 @@ Related options: ------------------------------------------------------------------------------ 2.2.3 Toggle comment map *NERDComToggleComment* -Default mapping: [count],c +Default mapping: [count]c Mapped to: NERDCommenterToggle Applicable modes: normal visual-line. @@ -178,15 +178,15 @@ lines were selected in visual-line mode. ------------------------------------------------------------------------------ 2.2.4 Minimal comment map *NERDComMinimalComment* -Default mapping: [count],cm +Default mapping: [count]cm Mapped to: NERDCommenterMinimal Applicable modes: normal visual-line. 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 ,cm -then a '/*' will be placed at the start of the top line and a '*/' will be -placed at the end of the last line. +For example: if you are programming in c and you select 5 lines and press +cm then a '/*' will be placed at the start of the top line and a '*/' +will be placed at the end of the last line. Sets of multipart comment delimiters that are between the top and bottom selected lines are replaced with place holders (see |'NERDLPlace'|) if @@ -200,7 +200,7 @@ lines were selected in visual-line mode. ------------------------------------------------------------------------------ 2.2.5 Invert comment map *NERDComInvertComment* -Default mapping: ,ci +Default mapping: ci Mapped to: NERDCommenterInvert Applicable modes: normal visual-line. @@ -217,7 +217,7 @@ lines were selected in visual-line mode. ------------------------------------------------------------------------------ 2.2.6 Sexy comment map *NERDComSexyComment* -Default mapping: [count],cs +Default mapping: [count]cs Mapped to: NERDCommenterSexy Applicable modes: normal, visual-line. @@ -237,16 +237,16 @@ Related options: ------------------------------------------------------------------------------ 2.2.7 Yank comment map *NERDComYankComment* -Default mapping: [count],cy +Default mapping: [count]cy Mapped to: NERDCommenterYank 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$ +Default mapping: c$ Mapped to: NERDCommenterToEOL Applicable modes: normal. @@ -256,7 +256,7 @@ the line. ------------------------------------------------------------------------------ 2.2.9 Append com to line map *NERDComAppendComment* -Default mapping: ,cA +Default mapping: cA Mapped to: NERDCommenterAppend Applicable modes: normal. @@ -282,12 +282,12 @@ to your vimrc. ------------------------------------------------------------------------------ 2.2.11 Use alternate delims map *NERDComAltDelim* -Default mapping: ,ca +Default mapping: ca Mapped to: NERDCommenterAltDelims 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 +if the user is editing a c++ file using // comments and they hit ca then they will be switched over to /**/ comments. See also |NERDComDefaultDelims| @@ -295,14 +295,14 @@ See also |NERDComDefaultDelims| ------------------------------------------------------------------------------ 2.2.12 Comment aligned maps *NERDComAlignedComment* -Default mappings: [count],cl [count],cb +Default mappings: [count]cl [count]cb Mapped to: NERDCommenterAlignLeft NERDCommenterAlignBoth Applicable modes: normal visual-line. -Same as ,cc except that the comment delimiters are aligned on the left side or -both sides respectively. These comments are always nested if the line(s) are -already commented. +Same as cc except that the comment delimiters are aligned on the left +side or both sides respectively. These comments are always nested 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. @@ -310,7 +310,7 @@ lines were selected in visual-line mode. ------------------------------------------------------------------------------ 2.2.13 Uncomment line map *NERDComUncommentLine* -Default mapping: [count],cu +Default mapping: [count]cu Mapped to: NERDCommenterUncomment Applicable modes: normal visual visual-line visual-block. @@ -581,7 +581,7 @@ this option tells the script whether to look for, and remove, comment delimiters of the alternative style. For example, if you are editing a c++ file using // style comments and you go -,cu on this line: > +cu on this line: > /* This is a c++ comment baby! */ < It will not be uncommented if the NERDRemoveAltComs is set to 0. @@ -633,7 +633,7 @@ To set these options use lines like: > Following the above example, if we have line of c code: > /* int horse */ < -and we comment it with ,cn it will be changed to: > +and we comment it with cn it will be changed to: > /*FOO int horse BAR*/ < When we uncomment this line it will go back to what it was. @@ -698,7 +698,8 @@ Values: 0 or 1. Default 1. 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 again +you hit cc on a line that is already commented it will be commented +again. ------------------------------------------------------------------------------ 3.3 Default delimiter customisation *NERDComDefaultDelims* diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 57f5e83..eab70aa 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -2725,21 +2725,21 @@ function! s:CreateMaps(target, combo) endfunction if g:NERDCreateDefaultMappings - call s:CreateMaps('NERDCommenterComment', ',cc') - call s:CreateMaps('NERDCommenterToggle', ',c') - call s:CreateMaps('NERDCommenterMinimal', ',cm') - call s:CreateMaps('NERDCommenterSexy', ',cs') - call s:CreateMaps('NERDCommenterInvert', ',ci') - call s:CreateMaps('NERDCommenterYank', ',cy') - call s:CreateMaps('NERDCommenterAlignLeft', ',cl') - call s:CreateMaps('NERDCommenterAlignBoth', ',cb') - call s:CreateMaps('NERDCommenterNest', ',cn') - call s:CreateMaps('NERDCommenterUncomment', ',cu') - call s:CreateMaps('NERDCommenterToEOL', ',c$') - call s:CreateMaps('NERDCommenterAppend', ',cA') + call s:CreateMaps('NERDCommenterComment', 'cc') + call s:CreateMaps('NERDCommenterToggle', 'c') + call s:CreateMaps('NERDCommenterMinimal', 'cm') + call s:CreateMaps('NERDCommenterSexy', 'cs') + call s:CreateMaps('NERDCommenterInvert', 'ci') + call s:CreateMaps('NERDCommenterYank', 'cy') + call s:CreateMaps('NERDCommenterAlignLeft', 'cl') + call s:CreateMaps('NERDCommenterAlignBoth', 'cb') + call s:CreateMaps('NERDCommenterNest', 'cn') + call s:CreateMaps('NERDCommenterUncomment', 'cu') + call s:CreateMaps('NERDCommenterToEOL', 'c$') + call s:CreateMaps('NERDCommenterAppend', 'cA') if !hasmapto('NERDCommenterAltDelims', 'n') - nmap ,ca NERDCommenterAltDelims + nmap ca NERDCommenterAltDelims endif endif