Reply to message «commenting with Stata files», 
sent 21:45:12 24 October 2010, Sunday
by Dimitriy V. Masterov:

> Stata files have extensions like *.ado,*.class,*.do,*.imata, and
> *.mata. I tried to include these file types by adding things like this
> to the plugin:
> 
> elseif fileType == 'ado' || fileType =='do'
> let commentSymbol_L = '/* '
> let commentSymbol_R = ' */'
<...>
> I could not get it to work. It still gives me an error message that
> the file type is not recognized. I also tried hacking some of the
> other commenting plugins, but with no luck. I also tried contacting
> the guy who wrote the script, but the e-mail bounced.
> 
> Has anyone gotten something like this to work? I am using vim 7.3.
Nerdcommenter (http://www.vim.org/scripts/script.php?script_id=1218) relies on 
&commentstring for unknown filetypes. I tried
    :set ft=ado
    aa<Esc>,cc
and it left ``/* a */'' in a buffer which was intended. But I do not have ado 
filetype plugin, so it probably won't work if your filetype plugin sets 
&commentstring to wrong value (`/*%s*/' is a default value for 
`&commentstring', 
but I do not see any reason why ado filetype plugin should alter that). If it 
happens, add line ``setlocal commentstring=/*%s*/'' to 
`~/.vim/ftplugin/ado.vim' 
and to `~/.vim/ftplugin/do.vim'.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to