Skip to content

Conversation

@albfan
Copy link

@albfan albfan commented Dec 1, 2025

Instead of extract the marker from last char of longest left comment allow to explicity set it

relates with #329

Instead of extract the marker from last char of longest left comment
allow to explicity set it
@albfan albfan mentioned this pull request Dec 1, 2025
@albfan
Copy link
Author

albfan commented Dec 1, 2025

to turn:

  <metadata>
    <property name="variant">dark</property>
    <property name="light-variant">Adwaita</property>
  </metadata>

into

  <!-- <metadata>
    <property name="variant">dark</property>
    <property name="light-variant">Adwaita</property>
  </metadata> -->

instead of

  <!-- <metadata>
  -   <property name="variant">dark</property>
  -   <property name="light-variant">Adwaita</property>
  - </metadata> -->

using:

let g:NERDCustomDelimiters = {
        \ 'xml':  { 'left': '<!--', 'right': '-->', 'marker': '', 'nested': 1 }
    \ }

@albfan
Copy link
Author

albfan commented Dec 1, 2025

NOTE1: 'nested' is required to avoid an error:

        call s:NerdEcho('Sexy comment aborted. Nested sexy cannot be nested', 0)

NOTE2:
Expectation was to only need to set:

let g:NERDCustomDelimiters = {
        \ 'xml':  { 'marker': '' }
    \ }

But that doesn't do anything using .cs

@albfan albfan mentioned this pull request Dec 1, 2025
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

Successfully merging this pull request may close these issues.

1 participant