I want to comment out a block of code in sublime text.
Active18 days ago
I see it in RailsCasts, but don't think he uses sublime text .. to do the following ..
Strikethrough keyboard shortcuts in MS Office. Posted in OneNote. On my Mac, in Word, command+shift+x works. Love the addition for the sticky notes! I spent the last few minutes trying to find out how to strikeout/cross out words/letters by using JUST the Keyboard but, more specifically on ‘Sticky Notes’ and I couldn’t find a. In Notepad++ and Geany (for example, amongst others), you have one command to comment AND another, different one to un-comment.That's very useful if you want to select a whole block where some lines are commented and some are not, and put everything under comments, or everything without comments. Cross Out Text / Strikethrough T̶e̶x̶t̶ Generator for Facebook, Twitter, Instagram and Other Social Networks. If you are looking to add strikethrough effect to your tweets or facebook messages, then this online tool will be just want you need. Select the text then use the button in the Font group on the Home tab of the Ribbon. Strikethrough is right there along with Bold, Italic, & Underline. If you do much of it you may prefer to use the keyboard shortcut Shift+Command+X or create a Character Style that includes the attribute. Mark up text with edits. Acrobat User Guide Select an article. (Mac OS) on the selected text to open a menu of text editing options. After marking the text, you can also click on a text edit tool. Click the text edit tool and then select the text. You can add a highlight with a note or you can cross out text.
Is there a shortcut in sublime text that I can use to insert the block of #'s?
Seanny123
2,96155 gold badges3838 silver badges7777 bronze badges
user749798
![]()
1,58788 gold badges3131 silver badges6161 bronze badges
8 Answers
The shortcut to comment out or uncomment the selected text or current line:
Alternatively, use the menu:
Edit > Comment
For the block comment you may want to use:
![]()
7,96177 gold badges3333 silver badges4444 bronze badges
You're looking for the
toggle_comment command. (Edit > Comment > Toggle Comment)
By default, this command is mapped to:
This command also takes a
block argument, which allows you to use block comments instead of single lines (e.g. /* .. */ as opposed to // .. in JavaScript). By default, the following key combinations are mapped to toggle block comments:
27.6k1212 gold badges103103 silver badges137137 bronze badges
With a non-US keyboard layout the default shortcut Ctrl+/ (Win/Linux) does not work.
I managed to change it into Ctrl+1 as per Robert's comment by writing
to
Preferences -> Key Bindings (on the right half, the user keymap).
Note that there should be only one set of brackets (' np8np8
[] ') at the right side; if you had there something already, copy paste this between the brackets and keep only the outermost brackets. The best text to speech software for mac for free.
4,63811 gold badge2525 silver badges4040 bronze badges
Ctrl-/ will insert
// style commenting, for javascript, etcCtrl-/ will insert <!-- --> comments for HTML,Ctrl-/ will insert # comments for Ruby,.etc Shortcut For Crossing Out Text On Macbook Pro
But does not work perfectly on HTML
<script> tags.
Short Cut For Crossing Out Text On Macbook
HTML
<script> .blah. </script> tags:Ctrl-/ twice (ie Ctrl-/Ctrl-/) will effectively comment out the line:
Ctrl--Shift-/ does not produce multi-line comments on HTML (or even single line comments), but does
add /* */ style multi-line comments in Javascript, text, and other file formats.
--
[I added as a new answer since I could not add comments. NIMISHAN
I included this info because this is the info I was looking for, and this is the only related StackOverflow page from my search results. I since discovered the // trick for HTML script tags and decided to share this additional information, since it requires a slight variation of the usual catch-all (and reported above) / and Ctrl--Shift-/ method of commenting out one's code in sublime.]
1,00711 gold badge1313 silver badges2323 bronze badges
SherylHohmanSherylHohman
6,67588 gold badges4444 silver badges5656 bronze badges
You can toggle the block comment with
Ctrl+Shift+/
Source: http://www.sublimetext.com/forum/viewtopic.php?f=3&t=2967 Making text subtitles for video in mac.
NIMISHAN
1,00711 gold badge1313 silver badges2323 bronze badges
DHinchDHinch
Just in case someone is using the Portuguese ABNT keyboard layoutThe shortcut is
nassimnassim
Just an important note. If you have HTML comment and your uncomment doesn't work NIMISHAN
(Maybe it's a PHP file), so don't mark all the comment but just put your cursor at the end or at the beginning of the comment (before ) and try again (Ctrl+/).
1,00711 gold badge1313 silver badges2323 bronze badges
Eran OrEran Or
In mac I did this
13.2k66 gold badges3434 silver badges6868 bronze badges
TrickyJTrickyJ
Not the answer you're looking for? Browse other questions tagged keyboard-shortcutssublimetext or ask your own question.
Plenty of keyboard shortcuts are available for formatting text in a Word document. But for some reason, Microsoft didn't build one in for the Strikethrough format. If you need to strike through text with some regularity (not as part of tracked changes, but simply as a manually applied format), you'll save time by creating a shortcut of your own. Here's a quick rundown of the steps.
Note: If you need a cheat sheet printout, this info is available as a PDF download.
Figure A
Shortcut For Crossing Out Text On MacFigure B
Figure C
Now, you can select text and press the shortcut to apply (or remove) the Strikethrough format.
Find Shortcut On MacWord 2007Shortcut Keys For Mac
Word 2007 has a Strikethrough button in the Font group on the Home tab — but no keyboard shortcut. If you'd rather have a shortcut (which has the advantage of being available no matter what tab happens to be selected), the process is similar:
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |