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

How to add jsp support

chaiguolong opened this issue · comments

How to add jsp support. I tried adding it in default.vim
Call tcomment#type#Define('jsp', g:tcomment#inline_fmt_jsp)
And redefine the variable g:tcomment#inline_fmt_jsp

If !exists('g:tcomment#inline_fmt_jsp')
     "Generic xml-like comments.
     " :read: let g:tcomment#inline_fmt_xml = {...} "{{{2
     Let g:tcomment#inline_fmt_jsp = {
                 \ 'commentstring': "<%-- %s --%>",
                 \ 'replacements': g:tcomment#replacements_xml
                 \ }
Endif

But remind me of the following error, I don't know how to add it, ask for your help.

An error occurred while processing function tcomment#Comment[171]..111_ProcessLine[28]..tcomment#format#Printf1:
Line 4:
E767: too many arguments to printf()
An error occurred while processing function tcomment#Comment:
Line 171:
E171: Missing :endif

You have to escape the percent signs: "<%%-- %s --%%>"