Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTommy Kristensen
Courses Plus Student 3,031 PointsDefault shortcuts do not work sublime text 3
everywhere in program, it says shortcut IS ctrl+/, but it doesn't work
Tommy Kristensen
Courses Plus Student 3,031 Pointsit says 'ctrl + /', which is the wierd part. i use Windows and the code in Preference -> key bindings Default:
{ "keys": ["ctrl+/"], "command": "toggle_comment", "args": { "block": false } }, { "keys": ["ctrl+shift+/"], "command": "toggle_comment", "args": { "block": true } },
3 Answers
huckleberry
14,636 PointsCTRL + / is the hotkey for making a block of code into a comment. Is that what you're trying to do??
I use sublime text 3 as well and I use that hotkey all the time so I do know that it does what it's supposed to.
You have to highlight the chunk of text that you want to comment out and then hold down ctrl and press the /
Let me know if that doesn't work.
Colin Marshall
32,861 PointsYou are correct. I don't have to highlight anything for comments to work though. They will work on a blank line allowing me to type a comment without selecting anything.
huckleberry
14,636 PointsWell slap me silly, I didn't know that. While I do often comment out chunks of code in order to test and debug and all that silly fun stuff, I wasn't aware that for single lines that you could just place the cursor and use the hotkey to comment out a single line. I thought you still had to select all the code on that line...
shazaam!!
Thanks buddy :)
Colin Marshall
32,861 PointsNo problem! I love Sublime Text the more and more I figure out about it. So simple, yet extremely powerful.
huckleberry
14,636 PointsSame!
I really wish it had an auto-refresh in the browser when you make changes kind of thing like I hear brackets does. There was one package out there that I read about that offered that sort of thing but I couldn't get it to work.
Any knowledge about that?
Colin Marshall
32,861 PointsThe package I saw that could do browser refresh for Sublime was not worth it for me. As far as I could tell, you have to hit an extra command after you save, and the tab has to be the active one in the browser window. It's just as easy to hit the refresh button in the browser.
I have recently discovered mixture.io and it does the browser refresh as well as preprocessing. It recognizes when you save a file in the open project (from any app, not just Sublime) and will refresh the browser. Best of all it's free!
CodeKit also does the browser refresh and preprocessing but it costs $32. It has a trial download for you to test out first.
Tommy Kristensen
Courses Plus Student 3,031 Pointsthat is the problem, it doesn't work. Along with other shortcuts.
the code in Preference -> key bindings Default:
{ "keys": ["ctrl+/"], "command": "toggle_comment", "args": { "block": false } }, { "keys": ["ctrl+shift+/"], "command": "toggle_comment", "args": { "block": true } },
i use Windows btw
huckleberry
14,636 PointsYeah I've often just felt that alt+tab and ctrl+r was simple enough to not warrant a lengthy search trying to find the auto-refresh fix lol.
But I will look into those links you provided. I'm not yet into the preprocessors but, you know, before I know it lol.
Thanks!
huckleberry
14,636 PointsJust got an upboat on this a year later. Hmm. Forgot about this thread and the mini discussion about live reload. I never used mixture.io but I see that it's now defunct.
I just wanted to chime in and mention live-server for node. The instructions are on there and it's a cake walk.
If you're not familiar with node, doesn't matter. Just install node anyway as eventually you'll get around to it but until then you can at least use it for live-reload capabilities.
If you're not familiar with the command line or don't have some sort of bash/cygwin/whatever and you have no clue what I'm talking about... well, sorry. Go watch console foundations, then git foundations, install git, and then install node, then use the gitbash to install live-server.
It's sweet!
Cheers,
Huck -
Colin Marshall
32,861 PointsColin Marshall
32,861 PointsIn Sublime Text 3, go to the edit menu, then go to the comment menu and tell us what the keyboard shortcut says for "Toggle Comment"
Also, are you on OS X or Windows?