preservim / nerdcommenter

Vim plugin for intensely nerdy commenting powers
Creative Commons Zero v1.0 Universal
4.99k stars 450 forks source link

backslashes in delimiters aren't handled consistently #402

Open roryrjb opened 5 years ago

roryrjb commented 5 years ago

I added a pull request recently (https://github.com/scrooloose/nerdcommenter/pull/397) that was merged, this added support for troff-family (groff, troff, mandoc) comment delimiters, related to, but distinct from the existing man/manpage delimiters. This worked for adding the delimiter, but I've only just noticed that when trying to remove the delimiter it doesn't work and just adds another delimiter, i.e.:

.\" with this comment line I press <leader>C <space>
.\" .\" I get this

...I'm not that familiar with either this code base or Vim scripting but I believe it's just how backslashes are handled. From looking at all the delimiter definitions, the recent pull request above was the first time backslashes were present so I believe this has never come up.

roryrjb commented 5 years ago

I have opened a pull request to try to address this: https://github.com/scrooloose/nerdcommenter/pull/403.