Skip to content

Instantly share code, notes, and snippets.

@kvirani
Last active September 7, 2019 22:00
Show Gist options
  • Save kvirani/ee294f69a829d0b9eb2b to your computer and use it in GitHub Desktop.
Save kvirani/ee294f69a829d0b9eb2b to your computer and use it in GitHub Desktop.
W1D4 Homework Questions

On the road to being a Power User

Take control of your development environment by using more of the keyboard and less of the mouse/trackpad. As you write your code, use (Mac and Sublime) keyboard commands/shortcuts to, well... kill it!

Mastering your text editor and Operating System (OS) will make you a more efficient and impressive developer.

Power User Commands

Don't just read about these. If any of these are foreign / unfamiliar to you, be sure to practice them and make a mental note to use them when possible.

As the course progresses, you will be expected by teachers to use your editor/OS the way a seasoned developer does.

Note to Windows Users: While these are OSX-specific, the Windows commands are essentially the same. Instead of Cmd, I believe you'd use Ctrl. Don't take my word for it though (you may have to experiment or research this).

Cmd + Tab (OS X) / Alt + Tab (Win/Ubuntu)

  • To switch between apps.
  • I prefer using this over mac gestures to switch between apps/spaces
  • Hold down Cmd/Alt and press Tab multiple times to select the right app
  • Don't hold down Cmd/Alt for long (just until you hit Tab) to do a quick toggle of the last app you were on

Cmd + ~ (OS X)

  • The tilde key is beside the 1 key on your keyboard
  • Used to switch between windows of the same app
  • Great for when you have multiple Chrome windows. When you Chrome, use it to switch between all Chrome windows

Never minimize (OS X)

  • Novice mac users minimize apps.
  • There's no need for it.
  • It should be removed from OS X altogether, in my opinion.

Cmd + Shift + F (ST3)

  • To find in all files in the open project
  • Very important and powerful; Used commonly in projects where # of files is high (ie: most projects)
  • Can use regular expressions instead of plain string
  • The results are in a separate tab and you can interact with them (double click a result to jump to it)

Cmd + Arrow keys (OS X)

  • Jump to start / end of line (Home / End in Win/Ubuntu)
  • Used very commonly, in most editors / word processors
  • Hold down shift to select as you do this

Cmd + T (Terminal, Chrome, Finder)

  • Create new tab (tabs are awesome!)
  • Ctrl + T in Win/Ubuntu to open a new tab in Chrome

Cmd + Shift + T (Chrome) / Ctrl + Shift + T (Win/Ubuntu)

  • Re-open a previously closed tab

Cmd + W (Chrome) / Ctrl + W (Win/Ubuntu)

  • Close a tab

Cmd + T (ST3)

  • To navigate to a file (very flexible input)
  • One of the most used shortcuts in ST3
  • Useful for when there are many files in the project (like a Sinatra or Rails app) but start using it now

Cmd + Alt + Arrow keys (ST3, Chrome, and Terminal)

  • Switch between open tabs using the left/right arrow keys
  • A must use, as well. Give'r a shot!
  • Can also use Cmd + Shift + [ or Cmd + Shift + ] to go left/right in tabs

Cmd + / (ST3)

  • Comment out the selected line(s)

Cmd + Shift + P (ST3)

  • Open the command pallette (more on that in the videos)

Sublime Text Videos

Here are some screencasts by some dude that will hopefully help with that!

You're likely using Sublime Text 3 (ST3) but Sublime Text 2 (ST2) videos/tutorials are very relevant since 3 and 2 are fairly similar.

Watch the following videos. Note you don't have to watch them all tonight, but do remember to come back to them. Feel free to skip or scrub content you already know:

https://tutsplus.com/course/improve-workflow-in-sublime-text-2/

  1. All Getting Started Videos
  2. Zen Coding
  3. Regular Expressions
  4. Markdown
  5. File / Folder Creation
  6. Sidebar Enhancements
  7. Split Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment