Coding software shortcuts that you use that others might not be aware of

7 years ago from , Wannabe CSS god

I've been using Sublime text for a while now and I only just found out 5 minutes ago that highlighting a block of code and pressing Ctrl + Shift + / will automatically comment it out. My mind is blown, yet it seems so obvious that it would have been a feature.

So, what little shortcuts above do you use on a daily basis that others might not be aware of?


  • Joe TurnerJoe Turner, almost 7 years ago

    Highlight something, then hit CRTL + D - This will highlight other instances of this code/phrase and allow you to edit them all at the same time. Very handy as you can imagine.

    7 points
    • Robert BusbyRobert Busby, almost 7 years ago

      Holy, that's amazing.

      0 points
    • Pascal Gärtner, almost 7 years ago

      By far one of the best shortcuts in sublime text!

      0 points
    • Andrew LiebchenAndrew Liebchen, almost 7 years ago

      It's better. Just put your cursor inside something you want to highlight. Press cmd + D, viola, that whole thing is selected. Press cmd+D again to select the next instance, and so on.

      0 points
    • Todd Smith-SalterTodd Smith-Salter, almost 7 years ago (edited almost 7 years ago )

      Used in combination with CTRL + K can also be very handy, which skips the currently highlighted word. An example would be if I had the word 'poop' scattered throughout my stylesheet, but I want to select a limited set. I'd highlight one, then use CTRL + D to add one more instance of 'poop' at a time, and CTRL + K immediately after I add an instance to skip it.

      Edit: Sub CMD for CTRL on a Mac.

      Otherwise, CMD + CTRL + G on a mac will select all instances of the highlighted code in the current document is a nice one.

      These are all Sublime Text of course.

      0 points
  • Miguel Solorio, almost 7 years ago

    If you haven't installed Emmet, I highly encourage it as it boosts your productivity, and you don't have to type mundane code.


    5 points
  • Joe CJoe C, almost 7 years ago

    Haha, cool thread idea. I remember when I found that commenting shortcut, mind blown.

    One I used all day everyday is ' alt + cmd + . ' which automatically inserts a </...> closing html tag if you are in an open block. Pretty sure this exists in most code editors (it does in Sublime and Coda).

    3 points
  • Nathan ManousosNathan Manousos, almost 7 years ago

    ctrl + cmd + up/down arrow

    Moves lines as a unit up or down.

    2 points
  • Christopher AzarChristopher Azar, almost 7 years ago (edited almost 7 years ago )

    Open file in the current project: cmd + p + "filename"

    2 points
  • C___ F_____C___ F_____, almost 7 years ago (edited almost 7 years ago )

    Select line: cmd + L (it annoying takes the selection to the start of the next line, though. Pressing shift + left takes it back to one line)

    Wrap in tags: ctrl + shift + W

    Go to end of line: cmd + right

    They're the only ones that I use religiously

    2 points
  • Stijn EversdijkStijn Eversdijk, almost 7 years ago

    cmd + alt + 2 (or any other number) for opening multiple files next to each other. ctrl + cmd + p to toggle between to projects! :-)

    0 points
  • Nate DaubertNate Daubert, almost 7 years ago

    By pressing option + drag on a mac, you can select text by rectangle. Handy for editing multiple list elements.

    0 points
  • Ryhan HassanRyhan Hassan, almost 7 years ago

    Cmd + Shift + F to search across all files in your project.

    0 points