Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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