-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Force comment type in file? #223
Comments
I would like all comments in the file to be Twig comments. Is there any
way to do this?
Untested (please let me know if this doesn't work out): Is the filetype
twig or twig.html? Anyway, with the current master version you should be
able to set `g:tcomment#filetype#guess_twig` or
`g:tcomment#filetype#guess_twig_html` to 0 in order to disable guessing
the filetype.
HTH
|
The filetype is html.twig. But none of these seem to work for me, neither does I am using |
You might also have to execute
let g:tcomment#filetype#map['html.twig'] = 'twig'
after the plugin was executed once. (I'll make it easier to customize that.)
|
Ok, so this works for me:
Is there a way to automate execution of the plugin so it can run every time i open a Twig file? |
Is there any way to force a single comment type in a file?
I have a twig file like this:
When commenting with Tcomment, it uses html style comments by default. If I set the commentstring using
autocmd FileType html.twig setlocal commentstring=\{#%s#\}
orcall tcomment#type#Define('html.twig', '{# %s #}')
it uses Twig comments on the lines that start with Twig syntax, but not on lines starting with HTML.I would like all comments in the file to be Twig comments. Is there any way to do this?
The text was updated successfully, but these errors were encountered: