Comments (31)
I've been added as a maintainer to this repository, and PR #24 which adds this feature has been merged. Happy commenting everybody.
from nerdcommenter.
That would be totally great....
Current behavior is annoying
from nerdcommenter.
Fyi, I submitted a pull request for this feature a while ago: #24
from nerdcommenter.
+1
from nerdcommenter.
+1
from nerdcommenter.
+1
from nerdcommenter.
+1
from nerdcommenter.
FYI for those looking for this feature
The code offered above is a working solution. Once you install it, just edit the plugin as described.
from nerdcommenter.
+1
from nerdcommenter.
+1
from nerdcommenter.
Please, accept this pull request :)
from nerdcommenter.
+1
from nerdcommenter.
👍
from nerdcommenter.
+1
from nerdcommenter.
+1
from nerdcommenter.
+1
from nerdcommenter.
+1
from nerdcommenter.
+1
from nerdcommenter.
+1
from nerdcommenter.
+1
from nerdcommenter.
👍
from nerdcommenter.
+1
from nerdcommenter.
+1
from nerdcommenter.
This is what I did based on the comments above:
search for this line in the CommentLinesToggle function:
let theLine = s:AddLeftDelim(s:Left({'space': 1}), theLine)
And edit it to become this:
let theLine = s:AddLeftDelimAligned(s:Left({'space': 1}), theLine, 0)
from nerdcommenter.
👍
from nerdcommenter.
love this
from nerdcommenter.
👍
from nerdcommenter.
+1
from nerdcommenter.
In case you want your comments to be aligned at the indentation level of left-most part to be commented out:
for i in range(10):
#if i / 2 == 0:
# print "Ciao"
print "finito"
You can get the index for indentation by calling
let leftAlignIndx = s:LeftMostIndx(a:forceNested, 0, a:firstLine, a:lastLine)
and use this index as last argument for the mentioned call let theLine = s:AddLeftDelimAligned(s:Left({'space': 1}), theLine, 0)
. This obviously has to happen in the definition of function function s:CommentLinesToggle
.
from nerdcommenter.
Yes please; it will be a great to be able to toggle comments, aligned.
from nerdcommenter.
Ok, can someone a little more seasoned with vim than me take over this plugin and merge the PRs to the new fork? @scrooloose is obviously not interested in it anymore looking at the lack of response to any PR or issue filed here.
Please?
I don't want to create yet another fork as 257 ppl already did just to have to get some simple PR in.
from nerdcommenter.
Related Issues (20)
- The vue hook doesn't work now HOT 5
- `commentstring` value is not updated after first usage in the buffer HOT 8
- If `$` is selected, the following line is commented as well HOT 1
- [Feature Request] Sexy comments with double star (/** */) HOT 1
- How to map the function toggling comment state to a keymap in normal mode and visual mode? HOT 2
- Error on version 2.6.0 HOT 4
- [Bug] Vim file with inline comment and spaces before line can't be uncommented normally. HOT 5
- Uncommenting indented code is broken for vim9script HOT 5
- [Bug] Add left delim comment before leading space
- [Feature Request] Add in place commenting option
- Uncommenting does not work when left delimiter starts with backslash HOT 7
- [Feature Request] Un/Folding comments HOT 2
- Fortran is not supported HOT 3
- Ignore specific lines when comment/uncomment HOT 2
- [Question] how to placte the cursor a line below commented section? HOT 3
- readme.md needs to include autoload vim file
- infinite recursion when trying to comment glsl code HOT 4
- NERDCommenterDelims left switches to leftAlt repeatedly on a new .c buffer open
- Keep selection after commenting HOT 4
- Long comments automatically being wrapped? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nerdcommenter.