Hacker News new | past | comments | ask | show | jobs | submit login

This is a great intro. Here's my favorite OS X Terminal trick:

⌘. (command period) is a hotkey not defined in the menu for sending BREAK. This is automatically equivalent to ctrl+c in shells, ctrl+g in emacs and ESC in Vim. Similarly, ⌘K is short for clearing the screen. These are much more ergonomic than the standards on Mac laptops and wireless keyboards.




For those not already aware, cmd &. is the standard shortcut for "stop". Works for all sorts, from web page loads to Xcode builds.


How is cmd + K different from cmd + R and/or $ clear?


Using ⌘+K will not only clear the screen, but will also delete the scrollable history buffer in Terminal or iTerm2.

I find this useful before printing text that I want to search using ⌘+F.


$ clear is six characters, and you have to be on a new prompt first. ⌘R is a reset command, meaning it's for restoring a garbled terminal. ⌘K will keep your input on the line but clear other output, same as ⌃L but more pinky-friendly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: