Skip to content

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

@Masquue

Description

@Masquue

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'?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions