Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: getting vim to use Stata-style comments for do, ado, mata, imata and class files


From   "Dimitriy V. Masterov" <[email protected]>
To   Statalist <[email protected]>
Subject   st: getting vim to use Stata-style comments for do, ado, mata, imata and class files
Date   Sat, 23 Oct 2010 13:21:04 -0400

I am having trouble getting vim to allow me to use Stata-specific
comments with a shortcut. I tried using a plugin called
FeralToggleCommentify, which is available at
http://vim.sourceforge.net/scripts/script.php?script_id=665 .

It gets vim to use :CC, :UC, and :TC to comment, uncomment, and toggle
comments. You can also specify a line range. The nice feature is that
this plugin changes the commenting symbols depending on what type of
file you are editing.

Allegedly, it alllows you to add your own file types by adding 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 have vim 7.3 on a
64-bit Windows 7 laptop.

DVM
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index