mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-08 09:53:47 -05:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
377a04eeec | ||
|
|
709d01d074 | ||
|
|
2e9b7ca58e | ||
|
|
01d6c8c7f6 | ||
|
|
89c008b644 | ||
|
|
1b9033c7ee | ||
|
|
165d1e3686 | ||
|
|
4567fae10f | ||
|
|
2ea675da5e | ||
|
|
865d928a1f | ||
|
|
8a0056a610 | ||
|
|
e466dd9418 |
@@ -111,8 +111,9 @@ 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|
|
||||
@@ -288,13 +289,19 @@ insert mode between the new delimiters.
|
||||
------------------------------------------------------------------------------
|
||||
2.2.11 Insert comment map *NERDComInsertComment*
|
||||
|
||||
Default mapping: <C-c>
|
||||
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.
|
||||
|
||||
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*
|
||||
|
||||
@@ -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.
|
||||
|
||||
The default key mappings will look like this: >
|
||||
\cc
|
||||
\cu
|
||||
\ca
|
||||
\ci
|
||||
\cs
|
||||
,cc
|
||||
,cu
|
||||
,ca
|
||||
,ci
|
||||
,cs
|
||||
...
|
||||
<
|
||||
However, if this line: >
|
||||
@@ -852,6 +859,22 @@ if your face looked like a toaster and a t-rex put together? :(
|
||||
==============================================================================
|
||||
7. Changelog *NERDComChangelog*
|
||||
|
||||
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
|
||||
@@ -1189,6 +1212,11 @@ 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
|
||||
|
||||
@@ -1239,6 +1267,7 @@ Vladimir Lomov asymptote
|
||||
Marco mrxvtrc, aap
|
||||
nicothakis SVNAnnotate, CVSAnnotate, SVKAnnotate,
|
||||
SVNdiff, gitAnnotate, gitdiff, dtrace
|
||||
llvm
|
||||
Chen Xing Wikipedia
|
||||
Jacobo Diaz dakota, patran
|
||||
Li Jin gentoo-env-d, gentoo-init-d,
|
||||
@@ -1252,6 +1281,9 @@ 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*
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
" File: NERD_commenter.vim
|
||||
" Description: vim global plugin that provides easy code commenting
|
||||
" Maintainer: Martin Grenfell <martin_grenfell at msn dot com>
|
||||
" Last Change: 22 June, 2008
|
||||
" Version: 2.1.17
|
||||
" Last Change: 27 June, 2008
|
||||
" License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
@@ -10,7 +11,6 @@
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
" ============================================================================
|
||||
let s:NERD_commenter_version = 2.1.15
|
||||
|
||||
" Section: script init stuff {{{1
|
||||
if exists("loaded_nerd_comments")
|
||||
@@ -77,7 +77,7 @@ call s:InitVariable("g:NERDAppendComMap", g:NERDMapleader . 'A')
|
||||
call s:InitVariable("g:NERDComAlignBothMap", g:NERDMapleader . 'b')
|
||||
call s:InitVariable("g:NERDComAlignLeftMap", g:NERDMapleader . 'l')
|
||||
call s:InitVariable("g:NERDComAlignRightMap", g:NERDMapleader . 'r')
|
||||
call s:InitVariable("g:NERDComInInsertMap", '<C-c>')
|
||||
call s:InitVariable("g:NERDComInInsertMap", '')
|
||||
call s:InitVariable("g:NERDComLineInvertMap", g:NERDMapleader . 'i')
|
||||
call s:InitVariable("g:NERDComLineMap", g:NERDMapleader . 'c')
|
||||
call s:InitVariable("g:NERDComLineNestMap", g:NERDMapleader . 'n')
|
||||
@@ -384,7 +384,7 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
||||
elseif a:filetype == "gtkrc"
|
||||
call s:MapDelimiters('#', '')
|
||||
elseif a:filetype == "haskell"
|
||||
call s:MapDelimitersWithAlternative('--','', '{-', '-}')
|
||||
call s:MapDelimitersWithAlternative('{-','-}', '--', '--')
|
||||
elseif a:filetype == "hb"
|
||||
call s:MapDelimiters('#', '')
|
||||
elseif a:filetype == "h"
|
||||
@@ -465,6 +465,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
||||
call s:MapDelimitersWithAlternative(';','', '#|', '|#')
|
||||
elseif a:filetype == "lite"
|
||||
call s:MapDelimiters('/*','*/')
|
||||
elseif a:filetype == "llvm"
|
||||
call s:MapDelimiters(';','')
|
||||
elseif a:filetype == "lookupfile"
|
||||
call s:MapDelimiters('', '')
|
||||
elseif a:filetype == "lotos"
|
||||
@@ -487,6 +489,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
||||
call s:MapDelimiters('dnl ', '')
|
||||
elseif a:filetype == "mail"
|
||||
call s:MapDelimiters('> ','')
|
||||
elseif a:filetype == "mailcap"
|
||||
call s:MapDelimiters('#','')
|
||||
elseif a:filetype == "make"
|
||||
call s:MapDelimiters('#','')
|
||||
elseif a:filetype == "map"
|
||||
@@ -759,6 +763,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
||||
call s:MapDelimiters('#', '')
|
||||
elseif a:filetype == "st"
|
||||
call s:MapDelimiters('"','')
|
||||
elseif a:filetype == "stata"
|
||||
call s:MapDelimiters('/*','*/')
|
||||
elseif a:filetype == "stp"
|
||||
call s:MapDelimiters('--', '')
|
||||
elseif a:filetype == "strace"
|
||||
@@ -889,6 +895,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
||||
call s:MapDelimiters('/*','*/')
|
||||
elseif a:filetype == "yaml"
|
||||
call s:MapDelimiters('#','')
|
||||
elseif a:filetype == "xquery"
|
||||
call s:MapDelimiters('(:',':)')
|
||||
elseif a:filetype == "z8a"
|
||||
call s:MapDelimiters(';', '')
|
||||
|
||||
@@ -3290,7 +3298,9 @@ execute 'nmap <silent>' . g:NERDAppendComMap . ' :call NERDComment(0, "append")<
|
||||
execute 'nmap <silent>' . g:NERDPrependComMap . ' :call NERDComment(0, "prepend")<cr>'
|
||||
|
||||
" set up the mapping to insert comment delims at the cursor position in insert mode
|
||||
execute 'inoremap <silent>' . g:NERDComInInsertMap . ' ' . '<SPACE><BS><ESC>:call NERDComment(0, "insert")<CR>'
|
||||
if g:NERDComInInsertMap != ''
|
||||
execute 'inoremap <silent>' . g:NERDComInInsertMap . ' ' . '<SPACE><BS><ESC>:call NERDComment(0, "insert")<CR>'
|
||||
endif
|
||||
|
||||
" Section: Menu item setup {{{1
|
||||
" ===========================================================================
|
||||
|
||||
Reference in New Issue
Block a user