Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[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" <dvmaster@gmail.com>
To   Statalist <statalist@hsphsun2.harvard.edu>
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index