How can I comment out a region (selection) of code? In other words, select several lines of code, right click (or key combo) and comment out that section (adding the correct lang comment tag).
Thanks
Stephen cox
command+/
I suggest you go through the whole textmate manual sometime soon, it has all of those nice key shortcuts in it :)
On Wed, May 21, 2008 at 10:59 PM, crag stephen@networkxfla.com wrote:
How can I comment out a region (selection) of code? In other words, select several lines of code, right click (or key combo) and comment out that section (adding the correct lang comment tag).
Thanks
Stephen cox
View this message in context: http://www.nabble.com/Add-a-comment-region-tp17397875p17397875.html Sent from the textmate users mailing list archive at Nabble.com.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
I did. Also searched the help file. I also looked at every menu item. Can you point to where in the book the key-combo is?
command+/
I suggest you go through the whole textmate manual sometime soon, it has all of those nice key shortcuts in it :)
On 22 May 2008, at 08:20, crag wrote:
I did. Also searched the help file. I also looked at every menu item. Can you point to where in the book the key-combo is?
command+/
Always a good starting point for looking a specific command is to use Bundles > Select Bundle Item CTRL+APPLE+T
then start to type a significant word describing what are you looking for.
E.g. if you type "comment" probably the first item in the list will be yours.
Furthermore if you are looking for a command which counts words etc. simply type "count".
--Hans
why commant+/ is adding a tab for each call? public static function main () { ColorShortcuts.init(); DisplayShortcuts.init(); SoundShortcuts.init(); CurveModifiers.init(); TextShortcuts.init(); FilterShortcuts.init();
ColorShortcuts is at correct possition, the other five are going one tab at the right evertime i press the shortcut.
On Thu, May 22, 2008 at 9:26 AM, Hans-Joerg Bibiko bibiko@eva.mpg.de wrote:
On 22 May 2008, at 08:20, crag wrote:
I did. Also searched the help file. I also looked at every menu item. Can you point to where in the book the key-combo is?
command+/
Always a good starting point for looking a specific command is to use Bundles > Select Bundle Item CTRL+APPLE+T
then start to type a significant word describing what are you looking for.
E.g. if you type "comment" probably the first item in the list will be yours.
Furthermore if you are looking for a command which counts words etc. simply type "count".
--Hans
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 22 May 2008, at 12:12, Baluta Cristian wrote:
why commant+/ is adding a tab for each call?
public static function main () { ColorShortcuts.init(); DisplayShortcuts.init(); SoundShortcuts.init(); CurveModifiers.init(); TextShortcuts.init(); FilterShortcuts.init();
What do you are doing precisely (what language grammar, selection yes or no, soft tab, etc.)? For me it works.
--Hans
i'm selecting from line 2 to 7 and press the shortcut. I'm using ActionScript but i get this with php too. but more important, this behavior is only for lines of code inside a function, wich are already delayed with some tabs so to exemplify again, this is normal:
ColorShortcuts.init(); DisplayShortcuts.init(); SoundShortcuts.init(); CurveModifiers.init(); TextShortcuts.init(); FilterShortcuts.init();
after i press 3 times the shortcut i get:
/*ColorShortcuts.init(); DisplayShortcuts.init(); SoundShortcuts.init(); CurveModifiers.init(); TextShortcuts.init(); FilterShortcuts.init();*/
On Thu, May 22, 2008 at 1:20 PM, Hans-Joerg Bibiko bibiko@eva.mpg.de wrote:
On 22 May 2008, at 12:12, Baluta Cristian wrote:
why commant+/ is adding a tab for each call?
public static function main () { ColorShortcuts.init(); DisplayShortcuts.init(); SoundShortcuts.init(); CurveModifiers.init(); TextShortcuts.init(); FilterShortcuts.init();
What do you are doing precisely (what language grammar, selection yes or no, soft tab, etc.)? For me it works.
--Hans
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 22 May 2008, at 13:32, Baluta Cristian wrote:
i'm selecting from line 2 to 7 and press the shortcut. I'm using ActionScript but i get this with php too. but more important, this behavior is only for lines of code inside a function, wich are already delayed with some tabs
I tried to reproduce it. The only bug I found is the following:
If your indention is done by using a physical TAB (no soft tab), then you switch to soft tab, and press APPLE+/, this leads to a problem that all lines after the first one "will be intended" by two spaces caused by the issue that the first line starts with /* If I redo it several times the indention won't be increased.
Are you mixing no soft tabs and soft tabs settings within one file?
--Hans
2008/5/22 Baluta Cristian cristi.baluta@gmail.com:
i'm selecting from line 2 to 7 and press the shortcut. I'm using ActionScript but i get this with php too. but more important, this behavior is only for lines of code inside a function
That is because you start your selection after the tabs on the first line. If you instead select the entire line for all lines you want to comment out it works as expected.
I tried this in PHP. I wonder if this is a recent regression since I am pretty sure I have tried this before without getting the behaviour Christian mentions.
That's it, thank you. I remember i tried in the past and get used not to use it because of that behavior, but now i'll save some time.
On Thu, May 22, 2008 at 3:16 PM, Sven Axelsson sven.axelsson@gmail.com wrote:
2008/5/22 Baluta Cristian cristi.baluta@gmail.com:
i'm selecting from line 2 to 7 and press the shortcut. I'm using ActionScript but i get this with php too. but more important, this
behavior
is only for lines of code inside a function
That is because you start your selection after the tabs on the first line. If you instead select the entire line for all lines you want to comment out it works as expected.
I tried this in PHP. I wonder if this is a recent regression since I am pretty sure I have tried this before without getting the behaviour Christian mentions.
-- Sven Axelsson ++++++++++[>++++++++++>+++++++++++>++++++++++>++++++
++++<<<<<-]>++++.+.++++.>+++++.>+.<<-.>>+.>++++.<<.
+++.>-.<<++.>>----.<++.>>>++++++.<<<<.>>++++.<----.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate