Vanilla 1.1.1 is a product of Lussumo. More Information: Documentation, Community Support.
“mark as comment snippet”, for example, in C/C++ bundle, just erases selected lines. Intype 0.3.1.598.
Hmm.. Seems to work for me. What does the “mark_as_comment.itSnippet” file look like in your installation.
—Tstrokes
Mark as comment snippet in C/C++ bundle:
{
title: '// Mark as comment'
key_equivalent: 'Ctrl+/'
scope: 'source.c++'
content: '${SELECTED_TEXT/^.+$/\/\/ $0/g}'
}
Get C source file, select one or more lines, then Bundles->C->//Mark as comment, and selected line(s) disappear. Windows XP SP2. Wrap as comment works fine.
Edit: here is my test.cpp file. When I select whole 5 lines, or 1st, or from 2 to 5 inclusive, snippet does work. When I select 3, or 4, they disappear.
int main()
{
int a, b, c;
a = b + c;
}
Hmm.. That also works for me.
Works for me too. Screenshot?
Here are screenshots. If this is only my problem, then I won’t bother people anymore. Strange, I get the same behavior both at home and work computers.
Is it possible to include logic (is selection empty?) into this snippet? Seems that logic is hard to to implement with regexps. In fact, TextMate uses “Toggle Comment” command (ruby script), not snippet.
Ok, I’ve reproduced the bug now.
The key, as Jack said, is to make sure that you select the trailing \n character at the end of the selection. So, to trigger the disappearing lines you need to select like this:
http://www.dflock.co.uk/intype/SelectionCommentError2.png
not like this:
Fixed, will be available in next unstable release.
1 to 11 of 11