nerdcommenter
nerdcommenter copied to clipboard
Line up comment tag for multiple line block
for html when I set:
let g:NERDSpaceDelims = 1
let g:NERDCompactSexyComs = 0
let g:NERDDefaultAlign = 'left'
let g:NERDAltDelims_java = 1
let g:NERDCustomDelimiters = {
\ 'html': { 'left': '<!-- ','right': ' -->' }
\ }
after <Leader>cs, I got
<!--
my comment1
my comment2
-->
Can I make it align like below:
<!--
my comment1
my comment2
-->
C can do this as expected, but not for Custom Delimiters.
First, don't include the space after/before the delimiters in your config. The SpaceDelims setting is better for controlling that.
Second, to answer your question no I don't think that alignment is possible out of the box. You should be able to edit it pretty easily to do that and we'd be happy to accept a contribution that added a config option to make that a variant style, but I don't think we currently have an option to not indent the closing comment in that style (which wal really designed for languages like C, not HTML ;-)