Wrong indentation when inverting comment
Hi,
I happen to use the <Leader>ci command a lot for situations like the following python example:
# some_dict = {
# 'key1': 0,
# }
some_dict = {
'key1': 1,
}
When I use Invert Comment on that code, I get
some_dict = {
'key1': 0,
}
# some_dict = {
# 'key1': 1,
# }
But I would expect the # to be all aligned at the beginning of the line (as is done when I use <Leader>cc on the code).
Thanks for your help!
Try adding this to your vim configuration after instantiating the plugin:
let g:NERDDefaultAlign = 'start'
@alerque I have the same issue. It seems like NERDComToggleComment does not respect the alignment setting specified in g:NERDDefaultAlign where as NERDComComment does.
Same issue as mentioned here https://github.com/scrooloose/nerdcommenter/issues/128
Is g:NERDDefaultAlign supposed to change the alignment for toggling comments? As it doesn't seem to work.
Also observed here; I use let g:NERDDefaultAlign = 'left', which works fine when commenting a block of lines using NERDCommenterToggle, but if NERDCommenterInvert is used instead, the left indent is not respected.
Is this going to be fixed?
It will get fixed when somebody fixes it. This is an open source project and reliant on people that use it to fixi things or add features and submit their work for others to benefit from. I personally have limited time to develop this right now, but I've been staying on top of Pull Request submissions. Anybody should feel free to tackle this issue knowing their work will benefit others.