Commit Graph

357 Commits

Author SHA1 Message Date
Jaehwang Jerry Jung
867618364f Simplify and fix NERDCommenterInsert
* Simplify comment delimiter insertion.
* Remove the code that unnecessarily touches the leading spaces/tabs.
* Fix a bug in which `<Plug>NERDCommenterInsert` inserts the comment
  delimiters in a wrong position when `col('.')==1`.
  Example: `1|234` (cursor at `|`) → `/* */1234`.
* NOTE: Should avoid `feedkey(.., 'ni')` for inserting comment
  delimiters to ensure that `NERDCommenter_after` is called after
  inserting the delimiters. `feedkey` only adds the input to the queue,
  which will be processed after exiting the script context. On the other
  hand, `:normal` and `feedkey(.., 'x')` are eagerly processed.
2022-01-16 00:10:51 +09:00
Caleb Maclennan
b1bb758f14
Fix vimscript lint warnings 2021-07-29 17:26:06 +03:00
Caleb Maclennan
eeabded555
Pass range data through, error on case we can't shim 2021-07-29 17:20:35 +03:00
Caleb Maclennan
918592cdc6
Add warning messages to deprecated function calls 2021-07-29 16:49:12 +03:00
Caleb Maclennan
8e935a6367
Restore use to IsCharCommented function after autoload refactor goof 2021-07-29 16:48:31 +03:00
Caleb Maclennan
f21b0f8fab
Add shim functions to pass through to autoload namespace 2021-07-29 16:23:49 +03:00
antonk52
f12042b675 setup global variables and keymaps in plugin/nerdcommenter.vim 2021-07-24 21:55:50 +01:00
Andy Wokula
f62c4ca1d4
Move plugin file to autoload 2020-06-08 15:59:21 +03:00
Chuck Wilson
18cfe81550 Add support for augeas file types (#277) 2016-12-15 10:06:26 +02:00
Chris Linstid
057f6150bd Add ansible file type (#276) 2016-11-17 07:01:25 +02:00
Jorge Marin
ecdde217c0 Remove trailing whitespace for top and bottom line (#269)
Fixes #268

Remove trailing whitespace for top and bottom line when uncommenting a sexy commented block.
2016-11-15 17:20:51 +02:00
Alejandro Gallo
e1af5dae7d
Add support for molpro and vasp chemistry packages
Closes #275
2016-11-15 18:15:54 +03:00
Roland Hieber
97cb982f1f add support for M4 macro processor (#271)
M4 knows about two types of ignoring text.  But the concept which the
GNU M4 manual refers to as "comments" [0] (i.e., lines prefixed with
hash signs) is actually telling the interpreter "ignore this text, but
pass it to the output".  Most of the time, people don't want the macro
comments in their output, so instead the `dnl` ("discard to next line")
macro [1] is usually used for comments in the document-my-thoughts
sense.

[0]: https://www.gnu.org/software/m4/manual/m4.html#Comments
[1]: https://www.gnu.org/software/m4/manual/m4.html#Dnl
2016-10-10 17:24:21 +03:00
Caleb Maclennan
3d13266034
Add alternate delimiters for autohotkey (matching ahk)
Fixes #272
2016-10-10 17:21:01 +03:00
kaidiren
45689b2356 can enable TrimTrailingWhitespace when comment 2016-08-31 14:32:26 +08:00
Keunchan Park
ec0f4753d0 Add hive filetype (#255) 2016-07-14 13:12:25 +03:00
Alexandre Constantino
e2d47bec26 Add option to allow deleting trailing whitespace (#251)
Add option g:NERDTrimTrailingWhitespace to allow deleting trailing
whitespace when uncommenting a line.
2016-06-10 17:49:17 +03:00
Alexandre Constantino
e1aeec12be Allow commenting empty lines given configuration (#250)
* Allow commenting empty lines given configuration

    If g:NERDCommentEmptyLines=1 then it will comment empty line, which is
    useful when commenting blocks.

    When uncommenting it will delete any trailing whitespace.

* Add documentation for NERDCommentEmptyLines
2016-06-08 17:00:05 +03:00
Hsiaoyi Hsu
ce414bf622 Add filetype pug. Jade has been renamed to pug. 2016-05-31 22:30:37 +08:00
Hsiaoyi Hsu
7f07dcde28 Add hook functions for NERDComment and SwitchToAlternativeDelimiters 2016-05-31 14:28:56 +08:00
Caleb Maclennan
63bd306a7e
Sort file type list alphabetically 2016-05-27 09:04:44 +03:00
Lucas Bourneuf
df647acefc
fix asp support (doublon) 2016-05-27 08:59:05 +03:00
ARM9
e48cc752f3 Fix rust Alt comments (#248) 2016-05-26 17:25:29 +03:00
Alexander Alzate
4760e57514 Start Insertion in Append Mode When no Right Delim (#234) 2016-05-26 08:24:47 +03:00
dkim
c3afedbe22 Use getbufvar in an old-fashioned way for backward compatibility (#247)
getbufvar accepts only two arguments in Vim 7.3 (at least the one
included in OS X 10.11.5), and returns an empty string when the buffer
or variable does not exist: getbufvar({buffer}, {variable}).

Vim 7.4 has extended the built-in function so that it additionally
accepts an optional argument which determines the default return value:
getbufvar({buffer}, {variable}, [, {default}]). When the third argument
is not given and the buffer or variable does not exists, getbufvar
returns an empty string as before.

getbufvar({buffer}, {variable}) works in both Vim 7.3 and 7.4, and is
practically equivalent to getbufvar({buffer}, {variable}, 0) because an
empty string is coerced to 0 if necessary.
2016-05-25 23:17:10 +03:00
Caleb Maclennan
e91be123f0
Simplify and document the config key for toggling language defaults
Closes #33
2016-05-24 20:55:37 +03:00
Caleb Maclennan
8291af4c7c
Merge pull request #155 from saep/master
Implement functionality to chose the alternative comment style
2016-05-24 20:50:59 +03:00
Caleb Maclennan
ff0b875c8d
Add alt delimiter to R filetype for Roxygen strings 2016-05-24 18:02:14 +03:00
Caleb Maclennan
e0c4a25696
Merge pull request #246 from stevenweaver/master
adding hyphy filetype
2016-05-24 17:42:48 +03:00
Caleb Maclennan
00e9729661
Add multiline delimiter support to ASY file type 2016-05-24 17:36:01 +03:00
Caleb Maclennan
1d07874610
Add ASP filetype support 2016-05-24 17:35:14 +03:00
Caleb Maclennan
560d7f0f77
Merge pull request #245 from hightemp/master
Add ruby multiline comment tags
2016-05-24 17:09:28 +03:00
Caleb Maclennan
0a186faad1
Merge pull request #244 from svermeulen/working
Add file format and function for identifying commented lines from outside plugin
2016-05-24 17:04:55 +03:00
Caleb Maclennan
32cd2b9362
Merge pull request #243 from sailorfeng/master
Add lpc filetype support
2016-05-24 16:57:44 +03:00
Caleb Maclennan
264be25aa1
Use full English names when explaining functions 2016-05-24 16:24:20 +03:00
Klaas Boesche
c2fc065b33 Automatic real nesting for languages with support
Removes the placeholder workaround (forceNested) for languages which
allow truly nested comments and automatically applies them.
Enabled for haskell, racket, scheme, scala, lisp, ocaml, sml.
Fixes issue #131
2016-05-24 13:52:21 +02:00
Caleb Maclennan
2b3714bff6
Bump release number for the benefit of plugin managers that update to tags 2016-05-24 14:04:07 +03:00
Caleb Maclennan
45d94964ba
Merge pull request #230 from sbdchd/ruby
updated ruby comment to fit with ruby style guide
2016-05-24 11:59:30 +03:00
Caleb Maclennan
dad084190d
Update maintainer contact information 2016-05-24 11:50:30 +03:00
Caleb Maclennan
917bc892dc
Add delimiter for Paludis filetype
Closes #229
2016-05-24 11:10:31 +03:00
Caleb Maclennan
dcd63ec026
Add delimiters for Laravel filetype
Closes #219
2016-05-24 10:59:25 +03:00
Caleb Maclennan
ef692d5a91
Update Rust filetype with alternate comment delimiters
Closes #206
2016-05-24 10:48:03 +03:00
Caleb Maclennan
887232b8fe
Add cython and pyrex python dialects
Closes #199
2016-05-24 10:40:17 +03:00
Caleb Maclennan
9b86e000f2
Add work around to support lazy-loading
Closes #176, thanks to @chilicuil.
2016-05-24 10:26:09 +03:00
Caleb Maclennan
a5b5caff08
Add spin filetype support
Closes #154, thanks to @hmaarrfk.
2016-05-24 09:59:24 +03:00
Caleb Maclennan
08689c3f5c
Add multiline delimiter for Matlab
Closes #138, thanks to @hmaarrfk.
2016-05-24 09:51:07 +03:00
Caleb Maclennan
1d4e02c670
Add block comment delimiter as alternate for CoffeeScript
Closes #118
2016-05-24 09:27:33 +03:00
Caleb Maclennan
38d77f64cf
Add plain LaTeX file type support
Closes #105
2016-05-24 09:07:12 +03:00
Caleb Maclennan
4ebe5a9c5c
Merge pull request #239 from davidjb/master
Reapply PR #183 for Python comments, PR #100 undid this
2016-05-24 08:57:49 +03:00
Caleb Maclennan
90315ecf20
Add ss (lisp scheme) filetype support
Closes #61
2016-05-24 08:49:48 +03:00