tomtom / tcomment_vim

An extensible & universal comment vim-plugin that also handles embedded filetypes

Home Page:http://www.vim.org/scripts/script.php?script_id=1173

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dashes replaced with - in comments

victoriastuart opened this issue · comments

Wonderful plugin, but in HTML files dashes are being replaced by HTML codes in commented text:

http://js.cytoscape.org/#getting started
<!-- http://js.cytoscape.org/#getting&#45;started -->

Is there a solution to this? Thanks!

OK, I "solved" this.

  1. Find the problem
[victoria@victoria tcomment_vim]$ pwd; rg . -e '&#45;'

    /home/victoria/.vim/bundle/tcomment_vim
    ./autoload/tcomment.vim
    152:                "\     '-': '&#45;',
  1. Edit ~/.vim/bundle/tcomment_vim/autoload/tcomment.vim (line 152 per ripgrep result, above):
                "\     '-': '&#45;',
                "\     '&': '&#38;',
                \     '-': '-',
                \     '&': '&',

The simplest solution is to simply replace - with - ...

  1. Restart Vim.

Selection_999(2459)

If you don't want the replacements, set the variable to an empty dictionary. IIRC this could cause problems with nested comments (e.g, in embedded docs), which is why this feature exists in the first place.