Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Add left delim comment before leading space #495

Open
Masquue opened this issue Jul 24, 2022 · 0 comments
Open

[Bug] Add left delim comment before leading space #495

Masquue opened this issue Jul 24, 2022 · 0 comments

Comments

@Masquue
Copy link

Masquue commented Jul 24, 2022

Add a new option NERDCommentBeforeLeadingWhitespace or something to allow behavior of AddLeftDelim to be changed to

function! s:AddLeftDelim(delim, theLine) abort
  return substitute(a:theLine, '^\(\s*\)', a:delim . '\1' , '')
endfunction

This behavior can be achieved by setting existing option g:NERDDefaultAlign to 'start' (which is 'none' by default), and this option is used in all formatting commands except \cl (AlignLeft) and \cb (AlighBoth).

Is it a bug or design that using \cl or \cb does not respect the setting of g:NERDDefaultAlign when it is 'start'?

@Masquue Masquue changed the title [Feature Request] Add left delim comment before leading space [Bug] Add left delim comment before leading space Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant