mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-08 09:53:47 -05:00
Compare commits
474 Commits
2.2.2
...
7361e41811
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7361e41811 | ||
|
|
66c07e4083 | ||
|
|
3f860f2d98 | ||
|
|
c9b1078807 | ||
|
|
7bb1f72e80 | ||
|
|
fea637c3c2 | ||
|
|
e361a44230 | ||
|
|
da948e160d | ||
|
|
c52b6e731c | ||
|
|
d2e21d417f | ||
|
|
ab2ae4d502 | ||
|
|
844b211a4c | ||
|
|
b0b09ea46c | ||
|
|
2045211689 | ||
|
|
277bdfc679 | ||
|
|
1fe9e1cfea | ||
|
|
e23f55e735 | ||
|
|
91499c76a7 | ||
|
|
bd1a29536d | ||
|
|
c6766698d8 | ||
|
|
c5b0f78820 | ||
|
|
78029a0e90 | ||
|
|
457b383767 | ||
|
|
d069f7fb56 | ||
|
|
06f6166e5d | ||
|
|
c406bba57d | ||
|
|
ea6a4f76fa | ||
|
|
1caf560df1 | ||
|
|
98cc4a2d64 | ||
|
|
f575c18d05 | ||
|
|
fd2114b46d | ||
|
|
fe74a1b890 | ||
|
|
60f3a2bc2b | ||
|
|
2a0a05ff98 | ||
|
|
6d30ebcd42 | ||
|
|
f8671f783b | ||
|
|
ec002e8f5d | ||
|
|
f9c5f0fbda | ||
|
|
ac512fe158 | ||
|
|
867618364f | ||
|
|
97317fc319 | ||
|
|
37298c471e | ||
|
|
9fffd4c022 | ||
|
|
2e7a775dd2 | ||
|
|
eddd535bdf | ||
|
|
13d00954a6 | ||
|
|
ab67976bea | ||
|
|
fa9b74ff69 | ||
|
|
c7c99edfb7 | ||
|
|
a65465d321 | ||
|
|
9d5c12e126 | ||
|
|
2c87cae76e | ||
|
|
f7333809b6 | ||
|
|
576bd64482 | ||
|
|
ed591cb2a2 | ||
|
|
d398a0278c | ||
|
|
85364c56c4 | ||
|
|
b1bb758f14 | ||
|
|
eeabded555 | ||
|
|
918592cdc6 | ||
|
|
8e935a6367 | ||
|
|
f21b0f8fab | ||
|
|
c526e3957f | ||
|
|
47ab32444d | ||
|
|
8e8d74faaf | ||
|
|
dbc631adf9 | ||
|
|
ea11ba5a79 | ||
|
|
3768b28aa4 | ||
|
|
f12042b675 | ||
|
|
dec06b1fb9 | ||
|
|
a5d1663185 | ||
|
|
ab475e1325 | ||
|
|
d9366fc27c | ||
|
|
1b53686d5f | ||
|
|
b2642c8ed9 | ||
|
|
d4855b233e | ||
|
|
6d0ab7dec9 | ||
|
|
16ecc429ec | ||
|
|
1c7b57608e | ||
|
|
b83e9cdf83 | ||
|
|
898de2de1b | ||
|
|
2955d669dc | ||
|
|
7be3292b8d | ||
|
|
7d2fb974a3 | ||
|
|
119b99d166 | ||
|
|
f02686f2f6 | ||
|
|
3441a98b2d | ||
|
|
253eafd3a7 | ||
|
|
85750560a6 | ||
|
|
19f677513c | ||
|
|
7caf7b58a1 | ||
|
|
1f4a238e73 | ||
|
|
2e50bcbb8d | ||
|
|
a5772187fa | ||
|
|
592d5767e0 | ||
|
|
5a5bad0ece | ||
|
|
656f6b5beb | ||
|
|
cb5fb95a81 | ||
|
|
f9a87bf68f | ||
|
|
f62c4ca1d4 | ||
|
|
fade3d4b26 | ||
|
|
bedc6dc384 | ||
|
|
6b49172f9b | ||
|
|
c3e308c2ca | ||
|
|
95af34d581 | ||
|
|
be1a24d6d8 | ||
|
|
5e2aeffb03 | ||
|
|
700b7d2916 | ||
|
|
90f7606234 | ||
|
|
480799db6d | ||
|
|
8f375b0bbb | ||
|
|
f72adff404 | ||
|
|
97c79a541f | ||
|
|
c62e618a1a | ||
|
|
cbadb3d93e | ||
|
|
fa00e9820c | ||
|
|
6f1f2894cb | ||
|
|
96a6c3e452 | ||
|
|
53f5710627 | ||
|
|
eb6243c0c8 | ||
|
|
70b5b933cd | ||
|
|
ec16c09a0b | ||
|
|
e6510c1a71 | ||
|
|
24df32304e | ||
|
|
0384b5bf34 | ||
|
|
6295aeba66 | ||
|
|
277986725d | ||
|
|
ac3db1e70a | ||
|
|
6d51d1b334 | ||
|
|
8a68872933 | ||
|
|
8786861a3c | ||
|
|
f5525720ec | ||
|
|
ce590719f6 | ||
|
|
023f2d10d5 | ||
|
|
023cc20324 | ||
|
|
9208286236 | ||
|
|
a4b7c046b3 | ||
|
|
50f307bbf6 | ||
|
|
8228c7b0a7 | ||
|
|
2504a3d84e | ||
|
|
a05185584d | ||
|
|
df2f6825f4 | ||
|
|
7f5c217f79 | ||
|
|
14cd7719ac | ||
|
|
17cec9747e | ||
|
|
e6fd663def | ||
|
|
25c2920fe8 | ||
|
|
17b68e47d7 | ||
|
|
67950d4b5d | ||
|
|
f46226bcd6 | ||
|
|
5100f47542 | ||
|
|
5ac43900e9 | ||
|
|
3427b2f4ef | ||
|
|
371e4d0e09 | ||
|
|
d24868bc85 | ||
|
|
fdf950f20b | ||
|
|
f9dd87271a | ||
|
|
9a32fd2534 | ||
|
|
e679d8a341 | ||
|
|
670dba1bb5 | ||
|
|
2f973bd4fa | ||
|
|
ff3d8d7d7c | ||
|
|
af8bb4258d | ||
|
|
fd61bc71f6 | ||
|
|
3e99b39f4f | ||
|
|
09b07d50ba | ||
|
|
013cfec44d | ||
|
|
d4548ebb0c | ||
|
|
c321b3460b | ||
|
|
63ba1a1123 | ||
|
|
376838672d | ||
|
|
285902752f | ||
|
|
d1ac2382b2 | ||
|
|
a6b3cc6842 | ||
|
|
d05cfd190b | ||
|
|
0e1f6f6866 | ||
|
|
41e686824a | ||
|
|
59552f2e88 | ||
|
|
c5f8cbf70d | ||
|
|
607253203d | ||
|
|
18cfe81550 | ||
|
|
057f6150bd | ||
|
|
ecdde217c0 | ||
|
|
e1af5dae7d | ||
|
|
97cb982f1f | ||
|
|
3d13266034 | ||
|
|
c51f5992b2 | ||
|
|
fdc611c8f4 | ||
|
|
45689b2356 | ||
|
|
c3d6a2069b | ||
|
|
ec0f4753d0 | ||
|
|
e2d47bec26 | ||
|
|
e1aeec12be | ||
|
|
06c3184b2e | ||
|
|
ce414bf622 | ||
|
|
dde288a9cc | ||
|
|
7f07dcde28 | ||
|
|
63bd306a7e | ||
|
|
df647acefc | ||
|
|
e48cc752f3 | ||
|
|
4760e57514 | ||
|
|
c3afedbe22 | ||
|
|
e91be123f0 | ||
|
|
8291af4c7c | ||
|
|
6af02e1442 | ||
|
|
9425289459 | ||
|
|
9e8410e1b9 | ||
|
|
d59f0b614f | ||
|
|
1158546091 | ||
|
|
0cbbcb5674 | ||
|
|
ff0b875c8d | ||
|
|
e0c4a25696 | ||
|
|
00e9729661 | ||
|
|
1d07874610 | ||
|
|
560d7f0f77 | ||
|
|
0a186faad1 | ||
|
|
32cd2b9362 | ||
|
|
821fa9ad9e | ||
|
|
264be25aa1 | ||
|
|
ec802fe1d3 | ||
|
|
c2fc065b33 | ||
|
|
2b3714bff6 | ||
|
|
45d94964ba | ||
|
|
dad084190d | ||
|
|
917bc892dc | ||
|
|
dcd63ec026 | ||
|
|
ef692d5a91 | ||
|
|
887232b8fe | ||
|
|
9b86e000f2 | ||
|
|
a5b5caff08 | ||
|
|
08689c3f5c | ||
|
|
1d4e02c670 | ||
|
|
38d77f64cf | ||
|
|
4ebe5a9c5c | ||
|
|
90315ecf20 | ||
|
|
902837e2b1 | ||
|
|
247421c0ba | ||
|
|
81d0709db4 | ||
|
|
e482d8a9c4 | ||
|
|
a6f2bc084a | ||
|
|
6d97fbbd16 | ||
|
|
bfd80feb6f | ||
|
|
c3a82f40c2 | ||
|
|
180d46c300 | ||
|
|
b2dca140df | ||
|
|
e6e67e9470 | ||
|
|
bc40eac0c6 | ||
|
|
34e885bb8c | ||
|
|
0efb6c92bc | ||
|
|
cdf903440d | ||
|
|
f129cd81c8 | ||
|
|
3e269b53e4 | ||
|
|
6e6de4e2a4 | ||
|
|
789c248ad4 | ||
|
|
c7f339ee4e | ||
|
|
a7f679d3b8 | ||
|
|
d237cd666d | ||
|
|
6210dfa635 | ||
|
|
27108c45bc | ||
|
|
00592883c1 | ||
|
|
a458fcc036 | ||
|
|
8c9ae8c1ac | ||
|
|
e5b202fd43 | ||
|
|
88ef57e098 | ||
|
|
d9f96ceaf3 | ||
|
|
a35f1ebd0b | ||
|
|
f26ec29dd4 | ||
|
|
969219e62b | ||
|
|
2d702c9619 | ||
|
|
d672296a34 | ||
|
|
0d1fd7ff66 | ||
|
|
e5b0235247 | ||
|
|
cb98e173e7 | ||
|
|
5c61776994 | ||
|
|
4fc52fd698 | ||
|
|
7e75415e4d | ||
|
|
7bc40e53c0 | ||
|
|
d5b14f2c51 | ||
|
|
8d3dcc26a6 | ||
|
|
34e0115ffa | ||
|
|
60bd8664ba | ||
|
|
ca46be883e | ||
|
|
76afa5ba37 | ||
|
|
d1de6136ba | ||
|
|
94ecc6c282 | ||
|
|
668c8a7336 | ||
|
|
8fd8e9599f | ||
|
|
40007efa1a | ||
|
|
92de964f61 | ||
|
|
94bc2d62c6 | ||
|
|
40c4c66f7a | ||
|
|
1f4bfd5992 | ||
|
|
0bbb2da023 | ||
|
|
a3030b9625 | ||
|
|
05de4871ce | ||
|
|
534329d1b8 | ||
|
|
5cc672a4f2 | ||
|
|
cf4912d36c | ||
|
|
6bdeaaa3d4 | ||
|
|
3a60b6b1ec | ||
|
|
6591d08b24 | ||
|
|
776f69e684 | ||
|
|
2bffc66a42 | ||
|
|
e1029104f1 | ||
|
|
d4f41d2697 | ||
|
|
dbe8023a70 | ||
|
|
536779375d | ||
|
|
59c79279b5 | ||
|
|
1b62184305 | ||
|
|
6549cfde45 | ||
|
|
f1a23cde6d | ||
|
|
956431914f | ||
|
|
f5fba7c6c0 | ||
|
|
d4858b5c5b | ||
|
|
e107ccc9b3 | ||
|
|
785386db76 | ||
|
|
8c73eef0ea | ||
|
|
8c525a27aa | ||
|
|
1f06d8a4dd | ||
|
|
26558db9f1 | ||
|
|
289d2d64ec | ||
|
|
8fff061222 | ||
|
|
c73514084a | ||
|
|
4b049b83fa | ||
|
|
fbe3bd3c35 | ||
|
|
f234d01408 | ||
|
|
7770913088 | ||
|
|
785026abef | ||
|
|
58e34664d2 | ||
|
|
4f3d9c0e12 | ||
|
|
0c04654498 | ||
|
|
5724385b2f | ||
|
|
0b3d928dce | ||
|
|
00e41958df | ||
|
|
ab1fe7f5f0 | ||
|
|
c3756d1ecc | ||
|
|
8cf43a4057 | ||
|
|
7b127e63aa | ||
|
|
6983efa244 | ||
|
|
eb5720c365 | ||
|
|
fa7c2cdc2a | ||
|
|
f87a5f4b51 | ||
|
|
362f6706c6 | ||
|
|
f6137c7fc8 | ||
|
|
b660938045 | ||
|
|
1eb2eba5d3 | ||
|
|
06cf7e7c38 | ||
|
|
8f6abbe22a | ||
|
|
e5f6111856 | ||
|
|
f4b1a46a41 | ||
|
|
17168b0d61 | ||
|
|
4c03b5ac3f | ||
|
|
e983cf27e7 | ||
|
|
baa453aad8 | ||
|
|
7d49ac038d | ||
|
|
d64d909c9e | ||
|
|
27979e7194 | ||
|
|
fc04e4e8c1 | ||
|
|
ed45f9211b | ||
|
|
21222675c7 | ||
|
|
6f69cbcdd8 | ||
|
|
12b15e9804 | ||
|
|
7b78a83120 | ||
|
|
1671f8aa71 | ||
|
|
6e020aa61c | ||
|
|
2eecb5b6f2 | ||
|
|
2f62560dd6 | ||
|
|
d16e2ab1cf | ||
|
|
e2e786c59f | ||
|
|
cb242a9cb4 | ||
|
|
bfa37cdb8b | ||
|
|
68d496339a | ||
|
|
1b6058a597 | ||
|
|
cef3a9ce39 | ||
|
|
4afef1116c | ||
|
|
57ffc642e1 | ||
|
|
73b3fe939c | ||
|
|
69c5335553 | ||
|
|
f6a3b192b8 | ||
|
|
fc1988e573 | ||
|
|
93cdbafd7f | ||
|
|
20e089f6b9 | ||
|
|
4dd72ab0af | ||
|
|
ddb2952fdc | ||
|
|
98cec44ef6 | ||
|
|
86f4d493d9 | ||
|
|
f4d9f99f67 | ||
|
|
8f2af9a6d7 | ||
|
|
006a151a43 | ||
|
|
0c75ae7e7b | ||
|
|
27580f8777 | ||
|
|
fb4df3e71b | ||
|
|
0fe4938d22 | ||
|
|
63bf3811ce | ||
|
|
2c3409d97f | ||
|
|
95d04c69a2 | ||
|
|
785ad99c0b | ||
|
|
0bffc1a119 | ||
|
|
5dc223d8a6 | ||
|
|
f198e9ffce | ||
|
|
22e798edf5 | ||
|
|
a3ecc6dab5 | ||
|
|
754d5a5b2e | ||
|
|
e777829d34 | ||
|
|
d4a5479c2c | ||
|
|
68cfa2f3c5 | ||
|
|
0bb5f7e889 | ||
|
|
9b9c253680 | ||
|
|
1d40b1965c | ||
|
|
b141adda9e | ||
|
|
e5b158fe75 | ||
|
|
4a91777538 | ||
|
|
d5fed4daff | ||
|
|
a346df98e7 | ||
|
|
0a30bbe20c | ||
|
|
b28e7be632 | ||
|
|
cdb6db91cc | ||
|
|
1b78f253c2 | ||
|
|
5a9371437f | ||
|
|
ecb2715965 | ||
|
|
c83ec79110 | ||
|
|
6bd08739c1 | ||
|
|
37f684dbe8 | ||
|
|
b9e907d8fb | ||
|
|
4e5456522d | ||
|
|
d541c7d9b1 | ||
|
|
f98f73221c | ||
|
|
cb7bdd553a | ||
|
|
afe8d0d3fe | ||
|
|
38630ff5eb | ||
|
|
27b0ebe8d6 | ||
|
|
b4d04f36c5 | ||
|
|
3df2ca5285 | ||
|
|
c8d8318257 | ||
|
|
94cce2cc54 | ||
|
|
63b252ad40 | ||
|
|
2b60d872ba | ||
|
|
5dcab6ec82 | ||
|
|
0bcdac6c38 | ||
|
|
5084aa7653 | ||
|
|
69a575e70a | ||
|
|
197ce731be | ||
|
|
f8be02f10a | ||
|
|
90cf828ac0 | ||
|
|
9f955640ee | ||
|
|
47d9833740 | ||
|
|
1577f77ef4 | ||
|
|
17141e2244 | ||
|
|
29f8ebc7f5 | ||
|
|
ca6c791114 | ||
|
|
760df35273 | ||
|
|
591dd3e1fd | ||
|
|
4447e9e6e8 | ||
|
|
24c68a6852 | ||
|
|
ecf20b005c | ||
|
|
59094ae107 | ||
|
|
dc55b10bd7 | ||
|
|
8ef3473c2e | ||
|
|
8ed440ea20 | ||
|
|
930be32a23 | ||
|
|
d54bcbfc98 | ||
|
|
33e3ace742 | ||
|
|
c0d7109c6b | ||
|
|
5c9359d3cf | ||
|
|
02c726c6d1 | ||
|
|
d868eae71b | ||
|
|
e0191f2ce9 | ||
|
|
cea72da179 | ||
|
|
9c8343c939 | ||
|
|
a1b4c3b94a | ||
|
|
4d933f01d6 | ||
|
|
bca88e735b | ||
|
|
5d42b2ec5c | ||
|
|
ae430a62fc |
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github: [alerque, scrooloose]
|
||||
16
.github/workflows/reviewdog.yml
vendored
Normal file
16
.github/workflows/reviewdog.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: Reviewdog
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
vint:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Lint Vimscript in PR changes
|
||||
uses: reviewdog/action-vint@v1
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
reporter: github-pr-review
|
||||
level: info
|
||||
16
.github/workflows/vint.yml
vendored
Normal file
16
.github/workflows/vint.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: Vint
|
||||
on: [push]
|
||||
jobs:
|
||||
vint:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
- name: Setup dependencies
|
||||
run: pip install vim-vint
|
||||
- name: Lint Vimscript
|
||||
run: vint .
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
*~
|
||||
*.swp
|
||||
tags
|
||||
DEBUG
|
||||
|
||||
5
.vintrc.yaml
Normal file
5
.vintrc.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
cmdargs:
|
||||
severity: style_problem
|
||||
color: true
|
||||
env:
|
||||
neovim: false
|
||||
96
CHANGELOG.md
Normal file
96
CHANGELOG.md
Normal file
@@ -0,0 +1,96 @@
|
||||
# Changelog
|
||||
|
||||
### 2.7.0
|
||||
|
||||
* Support for many more filetypes
|
||||
* Sort out race condition when using utility functions directly
|
||||
* Fixup undo support when commenting results in cursor moves
|
||||
* Refactor comment insertion code
|
||||
|
||||
### 2.6.0
|
||||
|
||||
* Refactor code to run as autoload plugin
|
||||
* Add lots of community contributed file types
|
||||
* Fix several languages with idiosyncrasies
|
||||
* Improve interoperability with other vim settings
|
||||
* Improve handling of ranges
|
||||
* Improve help documentation
|
||||
* Cleanup and fix vimscript issues
|
||||
|
||||
### 2.5.2
|
||||
|
||||
* Minor update to include new file types contributed by the community over the last few months.
|
||||
* Also adds a customization option to the sexy comment style.
|
||||
|
||||
### 2.5.1
|
||||
|
||||
* Minor update release that adds a few new contributed filetypes and normalizes the code format a little bit.
|
||||
|
||||
### 2.5.0
|
||||
|
||||
* Add lots of new contributed file types, cleanup some odds and ends.
|
||||
* Bump "release" for the sake of plugin managers still not tracking master.
|
||||
|
||||
### 2.4.0
|
||||
|
||||
* Bump release number for the benefit of plugin managers that update to tags
|
||||
|
||||
### 2.3.0
|
||||
|
||||
* remove all filetypes which have a &commentstring in the standard vim runtime
|
||||
for vim > 7.0 unless the script stores an alternate set of delimiters
|
||||
* make the script complain if the user doesn't have filetype plugins enabled
|
||||
* use |<Leader>| instead of comma to start the default mappings
|
||||
* fix a couple of bugs with sexy comments - thanks to Tim Smart
|
||||
* lots of refactoring
|
||||
|
||||
### 2.2.2
|
||||
|
||||
* remove the NERDShutup option and the message is suppresses, this makes the plugin silently rely on &commentstring for unknown filetypes.
|
||||
* add support for dhcpd, limits, ntp, resolv, rgb, sysctl, udevconf and udevrules. Thanks to Thilo Six.
|
||||
* match filetypes case insensitively
|
||||
* add support for mp (metapost), thanks to Andrey Skvortsov.
|
||||
* add support for htmlcheetah, thanks to Simon Hengel.
|
||||
* add support for javacc, thanks to Matt Tolton.
|
||||
* make <%# %> the default delims for eruby, thanks to tpope.
|
||||
* add support for javascript.jquery, thanks to Ivan Devat.
|
||||
* add support for cucumber and pdf. Fix sass and railslog delims, thanks to tpope
|
||||
|
||||
### 2.2.1
|
||||
|
||||
* add support for newlisp and clojure, thanks to Matthew Lee Hinman.
|
||||
* fix automake comments, thanks to Elias Pipping
|
||||
* make haml comments default to -# with / as the alternative delimiter, thanks to tpope
|
||||
* add support for actionscript and processing thanks to Edwin Benavides
|
||||
* add support for ps1 (powershell), thanks to Jason Mills
|
||||
* add support for hostsaccess, thanks to Thomas Rowe
|
||||
* add support for CVScommit
|
||||
* add support for asciidoc, git and gitrebase. Thanks to Simon Ruderich.
|
||||
* 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
|
||||
|
||||
* rewrote the mappings system to be more "standard".
|
||||
* removed all the mapping options. Now, mappings to <plug> mappings are used
|
||||
* see :help NERDComMappings, and :help NERDCreateDefaultMappings for more info
|
||||
* remove "prepend comments" and "right aligned comments".
|
||||
* add support for applescript, calbire, man, SVNcommit, potwiki, txt2tags and SVNinfo. Thanks to nicothakis, timberke, sgronblo, mntnoe, Bernhard Grotz, John O'Shea, François and Giacomo Mariani respectively.
|
||||
* bugfix for haskell delimiters. Thanks to mntnoe.
|
||||
|
||||
### 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 NERDCommenterInsert if you wish to restore it
|
||||
121
LICENSE
Normal file
121
LICENSE
Normal file
@@ -0,0 +1,121 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
212
README.md
Normal file
212
README.md
Normal file
@@ -0,0 +1,212 @@
|
||||
# NERD Commenter
|
||||
|
||||
[](https://github.com/preservim/nerdcommenter/actions?workflow=Vint)
|
||||
|
||||
Comment functions so powerful—no comment necessary.
|
||||
|
||||
## Installation
|
||||
|
||||
### Via Plugin Manager (Recommended)
|
||||
|
||||
<details>
|
||||
<summary>Vim Plug</summary>
|
||||
|
||||
#### [Vim-Plug](https://github.com/junegunn/vim-plug)
|
||||
|
||||
1. Add `Plug 'preservim/nerdcommenter'` to your vimrc file.
|
||||
2. Reload your vimrc or restart
|
||||
3. Run `:PlugInstall`
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Vundle</summary>
|
||||
|
||||
#### [Vundle](https://github.com/VundleVim/Vundle.vim) or similar
|
||||
|
||||
1. Add `Plugin 'preservim/nerdcommenter'` to your vimrc file.
|
||||
2. Reload your vimrc or restart
|
||||
3. Run `:BundleInstall`
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>NeoBundle</summary>
|
||||
|
||||
#### [NeoBundle](https://github.com/Shougo/neobundle.vim)
|
||||
|
||||
1. Add `NeoBundle 'preservim/nerdcommenter'` to your vimrc file.
|
||||
2. Reload your vimrc or restart
|
||||
3. Run `:NeoUpdate`
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Pathogen</summary>
|
||||
|
||||
#### [Pathogen](https://github.com/tpope/vim-pathogen)
|
||||
|
||||
```sh
|
||||
cd ~/.vim/bundle
|
||||
git clone https://github.com/preservim/nerdcommenter.git
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Vim 8+ Packages</summary>
|
||||
|
||||
git clone https://github.com/preservim/nerdcommenter.git ~/.vim/pack/vendor/start/nerdcommenter
|
||||
</details>
|
||||
|
||||
### Manual Installation
|
||||
|
||||
<details>
|
||||
<summary>Unix</summary>
|
||||
|
||||
#### Unix
|
||||
|
||||
(For Neovim, change `~/.vim/` to `~/.config/nvim/`.)
|
||||
|
||||
```sh
|
||||
curl -fLo ~/.vim/plugin/nerdcommenter.vim --create-dirs \
|
||||
https://raw.githubusercontent.com/preservim/nerdcommenter/master/plugin/nerdcommenter.vim
|
||||
curl -fLo ~/.vim/doc/nerdcommenter.txt --create-dirs \
|
||||
https://raw.githubusercontent.com/preservim/nerdcommenter/master/doc/nerdcommenter.txt
|
||||
curl -fLo ~/.vim/autoload/nerdcommenter.vim --create-dirs \
|
||||
https://raw.githubusercontent.com/preservim/nerdcommenter/master/autoload/nerdcommenter.vim
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Windows</summary>
|
||||
#### Windows (PowerShell)
|
||||
|
||||
```powershell
|
||||
md ~\vimfiles\plugin
|
||||
md ~\vimfiles\doc
|
||||
$pluguri = 'https://raw.githubusercontent.com/preservim/nerdcommenter/master/plugin/nerdcommenter.vim'
|
||||
$docsuri = 'https://raw.githubusercontent.com/preservim/nerdcommenter/master/doc/nerdcommenter.txt'
|
||||
(New-Object Net.WebClient).DownloadFile($pluguri, $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath("~\vimfiles\plugin\nerdcommenter.vim"))
|
||||
(New-Object Net.WebClient).DownloadFile($docsuri, $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath("~\vimfiles\doc\nerdcommenter.txt"))
|
||||
```
|
||||
</details>
|
||||
|
||||
### Post Installation
|
||||
|
||||
Make sure that you have filetype plugins enabled, as the plugin makes use of **|commentstring|** where possible (which is usually set in a filetype plugin). See **|filetype-plugin-on|** for details, but the short version is make sure this line appears in your vimrc:
|
||||
|
||||
```sh
|
||||
filetype plugin on
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Documentation
|
||||
|
||||
Please see the vim help system for full documentation of all options: `:help nerdcommenter`
|
||||
|
||||
### Settings
|
||||
|
||||
Several settings can be added to your vimrc to change the default behavior. Some examples:
|
||||
|
||||
```vim
|
||||
" Create default mappings
|
||||
let g:NERDCreateDefaultMappings = 1
|
||||
|
||||
" Add spaces after comment delimiters by default
|
||||
let g:NERDSpaceDelims = 1
|
||||
|
||||
" Use compact syntax for prettified multi-line comments
|
||||
let g:NERDCompactSexyComs = 1
|
||||
|
||||
" Align line-wise comment delimiters flush left instead of following code indentation
|
||||
let g:NERDDefaultAlign = 'left'
|
||||
|
||||
" Set a language to use its alternate delimiters by default
|
||||
let g:NERDAltDelims_java = 1
|
||||
|
||||
" Add your own custom formats or override the defaults
|
||||
let g:NERDCustomDelimiters = { 'c': { 'left': '/**','right': '*/' } }
|
||||
|
||||
" Allow commenting and inverting empty lines (useful when commenting a region)
|
||||
let g:NERDCommentEmptyLines = 1
|
||||
|
||||
" Enable trimming of trailing whitespace when uncommenting
|
||||
let g:NERDTrimTrailingWhitespace = 1
|
||||
|
||||
" Enable NERDCommenterToggle to check all selected lines is commented or not
|
||||
let g:NERDToggleCheckAllLines = 1
|
||||
```
|
||||
|
||||
### Default mappings
|
||||
|
||||
> **Note:** You can turn off settings default mappings to provide your own from scratch (look at the [Settings list](#settings) above)
|
||||
|
||||
The following key mappings are provided by default (there is also a menu provided that contains menu items corresponding to all the below mappings):
|
||||
|
||||
Most of the following mappings are for normal/visual mode only. The **|NERDCommenterInsert|** mapping is for insert mode only.
|
||||
|
||||
* `[count]<leader>cc` **|NERDCommenterComment|**
|
||||
|
||||
Comment out the current line or text selected in visual mode.
|
||||
|
||||
* `[count]<leader>cn` **|NERDCommenterNested|**
|
||||
|
||||
Same as <leader>cc but forces nesting.
|
||||
|
||||
* `[count]<leader>c<space>` **|NERDCommenterToggle|**
|
||||
|
||||
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]<leader>cm` **|NERDCommenterMinimal|**
|
||||
|
||||
Comments the given lines using only one set of multipart delimiters.
|
||||
|
||||
* `[count]<leader>ci` **|NERDCommenterInvert|**
|
||||
|
||||
Toggles the comment state of the selected line(s) individually.
|
||||
|
||||
* `[count]<leader>cs` **|NERDCommenterSexy|**
|
||||
|
||||
Comments out the selected lines with a pretty block formatted layout.
|
||||
|
||||
* `[count]<leader>cy` **|NERDCommenterYank|**
|
||||
|
||||
Same as <leader>cc except that the commented line(s) are yanked first.
|
||||
|
||||
* `<leader>c$` **|NERDCommenterToEOL|**
|
||||
|
||||
Comments the current line from the cursor to the end of line.
|
||||
|
||||
* `<leader>cA` **|NERDCommenterAppend|**
|
||||
|
||||
Adds comment delimiters to the end of line and goes into insert mode between them.
|
||||
|
||||
* **|NERDCommenterInsert|**
|
||||
|
||||
Adds comment delimiters at the current cursor position and inserts between. Disabled by default.
|
||||
|
||||
* `<leader>ca` **|NERDCommenterAltDelims|**
|
||||
|
||||
Switches to the alternative set of delimiters.
|
||||
|
||||
* `[count]<leader>cl` **|NERDCommenterAlignLeft**
|
||||
`[count]<leader>cb` **|NERDCommenterAlignBoth**
|
||||
|
||||
Same as **|NERDCommenterComment|** except that the delimiters are aligned down the left side (`<leader>cl`) or both sides (`<leader>cb`).
|
||||
|
||||
* `[count]<leader>cu` **|NERDCommenterUncomment|**
|
||||
|
||||
Uncomments the selected line(s).
|
||||
|
||||
## Motions
|
||||
|
||||
While the plugin does not directly support motions, you can leverage its support for selections to do something very similar. For example, to add motions to toggle comments on the paragraph text object you could use:
|
||||
```vim
|
||||
nnoremap <silent> <leader>c} V}:call nerdcommenter#Comment('x', 'toggle')<CR>
|
||||
nnoremap <silent> <leader>c{ V{:call nerdcommenter#Comment('x', 'toggle')<CR>
|
||||
```
|
||||
|
||||
## Contributions
|
||||
|
||||
This plugin was originally written in 2007 by [Martin Grenfell (@scrooloose)](https://github.com/scrooloose/). Lots of features and many of the supported filetypes have come from [community contributors](https://github.com/preservim/nerdcommenter/graphs/contributors). Since 2016 it has been maintained primarily by [Caleb Maclennan (@alerque)](https://github.com/alerque). Additional file type support, bug fixes, and new feature contributons are all welcome, please send them as Pull Requests on Github. If you can't contribute yourself please also feel free to open issues to report problems or request features.
|
||||
18
Rakefile
18
Rakefile
@@ -1,18 +0,0 @@
|
||||
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
|
||||
|
||||
3032
autoload/nerdcommenter.vim
Normal file
3032
autoload/nerdcommenter.vim
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
131
plugin/nerdcommenter.vim
Normal file
131
plugin/nerdcommenter.vim
Normal file
@@ -0,0 +1,131 @@
|
||||
if exists('loaded_nerd_comments')
|
||||
finish
|
||||
endif
|
||||
if v:version < 700
|
||||
echoerr "NERDCommenter: this plugin requires vim >= 7. DOWNLOAD IT! You'll thank me later!"
|
||||
finish
|
||||
endif
|
||||
let loaded_nerd_comments = 1
|
||||
|
||||
" Function: s:InitVariable() function
|
||||
" This function is used to initialise a given variable to a given value. The
|
||||
" variable is only initialised if it does not exist prior
|
||||
"
|
||||
" Args:
|
||||
" -var: the name of the var to be initialised
|
||||
" -value: the value to initialise var to
|
||||
"
|
||||
" Returns:
|
||||
" 0
|
||||
function s:InitVariable(var, value)
|
||||
if !exists(a:var)
|
||||
execute 'let ' . a:var . ' = ' . string(a:value)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Section: variable initialization
|
||||
call s:InitVariable('g:NERDAllowAnyVisualDelims', 1)
|
||||
call s:InitVariable('g:NERDBlockComIgnoreEmpty', 0)
|
||||
call s:InitVariable('g:NERDCommentWholeLinesInVMode', 0)
|
||||
call s:InitVariable('g:NERDCommentEmptyLines', 0)
|
||||
call s:InitVariable('g:NERDCompactSexyComs', 0)
|
||||
call s:InitVariable('g:NERDCreateDefaultMappings', 1)
|
||||
call s:InitVariable('g:NERDDefaultNesting', 1)
|
||||
call s:InitVariable('g:NERDMenuMode', 3)
|
||||
call s:InitVariable('g:NERDLPlace', '[>')
|
||||
call s:InitVariable('g:NERDUsePlaceHolders', 1)
|
||||
call s:InitVariable('g:NERDRemoveAltComs', 1)
|
||||
call s:InitVariable('g:NERDRemoveExtraSpaces', 0)
|
||||
call s:InitVariable('g:NERDRPlace', '<]')
|
||||
call s:InitVariable('g:NERDSpaceDelims', 0)
|
||||
call s:InitVariable('g:NERDDefaultAlign', 'none')
|
||||
call s:InitVariable('g:NERDTrimTrailingWhitespace', 0)
|
||||
call s:InitVariable('g:NERDToggleCheckAllLines', 0)
|
||||
call s:InitVariable('g:NERDDisableTabsInBlockComm', 0)
|
||||
call s:InitVariable('g:NERDSuppressWarnings', 0)
|
||||
|
||||
" Section: Comment mapping and menu item setup
|
||||
" ===========================================================================
|
||||
|
||||
" Create menu items for the specified modes. If a:combo is not empty, then
|
||||
" also define mappings and show a:combo in the menu items.
|
||||
function! s:CreateMaps(modes, target, desc, combo)
|
||||
" Build up a map command like
|
||||
" 'noremap <silent> <Plug>NERDCommenterComment :call nerdcommenter#Comment("n", "Comment")'
|
||||
let plug = '<Plug>NERDCommenter' . a:target
|
||||
let plug_start = 'noremap <silent> ' . plug . ' :call nerdcommenter#Comment("'
|
||||
let plug_end = '", "' . a:target . '")<CR>'
|
||||
" Build up a menu command like
|
||||
" 'menu <silent> comment.Comment<Tab>\\cc <Plug>NERDCommenterComment'
|
||||
let menuRoot = get(['', 'comment', '&comment', '&Plugin.&comment', '&Plugin.Nerd\ &Commenter'],
|
||||
\ g:NERDMenuMode, '')
|
||||
let menu_command = 'menu <silent> ' . menuRoot . '.' . escape(a:desc, ' ')
|
||||
if strlen(a:combo)
|
||||
let leader = exists('g:mapleader') ? g:mapleader : '\'
|
||||
let menu_command .= '<Tab>' . escape(leader, '\') . a:combo
|
||||
endif
|
||||
let menu_command .= ' ' . (strlen(a:combo) ? plug : a:target)
|
||||
" Execute the commands built above for each requested mode.
|
||||
for mode in (a:modes ==# '') ? [''] : split(a:modes, '\zs')
|
||||
if strlen(a:combo)
|
||||
execute mode . plug_start . mode . plug_end
|
||||
if g:NERDCreateDefaultMappings && !hasmapto(plug, mode)
|
||||
execute mode . 'map <leader>' . a:combo . ' ' . plug
|
||||
endif
|
||||
endif
|
||||
" Check if the user wants the menu to be displayed.
|
||||
if g:NERDMenuMode !=# 0
|
||||
execute mode . menu_command
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
call s:CreateMaps('nx', 'Comment', 'Comment', 'cc')
|
||||
call s:CreateMaps('nx', 'Toggle', 'Toggle', 'c<Space>')
|
||||
call s:CreateMaps('nx', 'Minimal', 'Minimal', 'cm')
|
||||
call s:CreateMaps('nx', 'Nested', 'Nested', 'cn')
|
||||
call s:CreateMaps('n', 'ToEOL', 'To EOL', 'c$')
|
||||
call s:CreateMaps('nx', 'Invert', 'Invert', 'ci')
|
||||
call s:CreateMaps('nx', 'Sexy', 'Sexy', 'cs')
|
||||
call s:CreateMaps('nx', 'Yank', 'Yank then comment', 'cy')
|
||||
call s:CreateMaps('n', 'Append', 'Append', 'cA')
|
||||
call s:CreateMaps('', ':', '-Sep-', '')
|
||||
call s:CreateMaps('nx', 'AlignLeft', 'Left aligned', 'cl')
|
||||
call s:CreateMaps('nx', 'AlignBoth', 'Left and right aligned', 'cb')
|
||||
call s:CreateMaps('', ':', '-Sep2-', '')
|
||||
call s:CreateMaps('nx', 'Uncomment', 'Uncomment', 'cu')
|
||||
call s:CreateMaps('n', 'AltDelims', 'Switch Delimiters', 'ca')
|
||||
call s:CreateMaps('i', 'Insert', 'Insert Comment Here', '')
|
||||
call s:CreateMaps('', ':', '-Sep3-', '')
|
||||
call s:CreateMaps('', ':help NERDCommenterContents<CR>', 'Help', '')
|
||||
|
||||
" Shim functions so old code gets passed through to the autoload functions
|
||||
function! NERDComment(mode, type) range
|
||||
if !g:NERDSuppressWarnings
|
||||
echom 'Function NERDComment() has been deprecated, please use nerdcommenter#Comment() instead'
|
||||
endif
|
||||
if a:firstline != a:lastline
|
||||
echoerr "Sorry! We can't pass a range through this deprecation shim, please update your code."
|
||||
return v:false
|
||||
endif
|
||||
return nerdcommenter#Comment(a:mode, a:type)
|
||||
endfunction
|
||||
|
||||
function! NERDCommentIsLineCommented(lineNo)
|
||||
if !g:NERDSuppressWarnings
|
||||
echom 'Function NERDCommentIsLineCommented() has been deprecated, please use nerdcommenter#IsLineCommented() instead'
|
||||
endif
|
||||
return nerdcommenter#IsLineCommented(a:lineNo)
|
||||
endfunction
|
||||
|
||||
function! NERDCommentIsCharCommented(line, col)
|
||||
if !g:NERDSuppressWarnings
|
||||
echom 'Function NERDCommentIsCharCommented() has been deprecated, please use nerdcommenter#IsCharCommented() instead'
|
||||
endif
|
||||
return nerdcommenter#IsCharCommented(a:line, a:col)
|
||||
endfunction
|
||||
|
||||
inoremap <silent> <Plug>NERDCommenterInsert <C-\><C-O>:call nerdcommenter#Comment('i', "Insert")<CR>
|
||||
|
||||
" switch to/from alternative delimiters (does not use wrapper function)
|
||||
nnoremap <Plug>NERDCommenterAltDelims :call nerdcommenter#SwitchToAlternativeDelimiters(1)<CR>
|
||||
Reference in New Issue
Block a user