February 26, 2007 12:53 AM PST
Even though I've been using computers for longer than I haven't, there are always shortcuts and cool, but unknown features, in the ever increasing amount of software that I come to depend on. Here are some of the tips and tricks that John, J and I have picked up over the years.
Please add yours!
- ctrl-u deletes from the cursor to the beginning of the line.
- ctrl-k deletes from the cursor to the end of the line.
- ctrl-r search your command history.
- Linux and mac: the program lsof (list open files) is incredibly useful for seeing what files a particular pid has open.
- Type "explorer ." to open the Windows explorer in the shell's current directory. To do this from a Mac OS X Terminal prompt, type "open ."
- ctrl-z to suspended current running program; typing fg brings that process to the foreground.
- Drag and drop a file into the shell on windows or mac, and the full file path is entered for you.
- Type the domain name (ie "amazon", "google") and then ctrl-enter and it completes the "http://www." and ".com".
- Type "nullstream" then shift-enter, completes to www.nullstream.net
- Type "nullstream" then shift-ctrl-enter, completes to www.nullstream.org.
- ctrl-backspace deletes path segments one part at a time.
- ctrl-e gets you to the search bar (ctrl-k on Linux).
- Type something in the search bar and hit alt-enter, your search opens in a new tab.
- ctrl-t to open a new tab, ctrl-w to close the current tab.
- alt-home takes you to your home page.
- ctrl-L puts the keyboard focus on the address bar.
- alt-left, alt-right are back and forward, respectively.
- When on any web page with an image you want to save, simply click and drag the image to the desktop.
- Middle click on links to open them in new tabs.
- Shift click to open links in a new window.
- Middle click on a tab to close it.
- ctrl-tab, shift-ctrl-tab to switch between tabs.
- The bookmarks in the bookmarks toolbar folder show the favico from the site. You can edit these bookmarks to remove the name, and you just get a little button with the icon of the site. Very compact "site launcher", and also works with "live bookmarks". Does not work on the mac.
- You can switch tabs by hitting ctrl-tab and then using the cursor keys to select the tab you want.
- If you want to have a visual marker at 80 columns, create a new registry string value under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\Text Editor with the name Guides, and the value (which is an RGB color value and column number) RGB(255,128,128) 80. You can specify multiple markers with a comma separated list RGB(255,128,128) 80, 120, ... Then restart Visual Studio.
- ctrl-up or ctrl-down to scroll the page without moving the cursor location. Also works in most good editors like source insight, notepad++ Kdevelop.
- Instead of dragging and dropping things, I right click and drag and drop. This gives you a contextual menu on the drop target that allows you to choose "move" or "copy", which is useful for systems with more than one disk. John showed me this trick in the GoAhead days, and it was one of the first "nerd power up exchanges" we had.
- WIN key + E to open a new explorer window with the folder tree open.
- WIN key + L to lock the screen.
- WIN key + R to open the "Run program" dialog.
- CTRL-SHIFT-ESC brings up the task manager (ctrl-alt-del also brings up the task manager).
- WIN key + break brings up system properties.
- In your vi initialization file (.exrc in your home directory) add the line set ts=4 to get tabs every 4 characters (or whatever your coding standard dictates).
Mac OS X
- Fn-delete performs an actual 'del' of the character following the cursor.
- ctrl-K (it's also under the Window menu) brings up a dialog that lets you slow down a song up to 50% (change the tempo) without affecting the pitch, which is useful for transcribing the notes in a song.
- cmd-opt-ctrl-8 toggles the inverting of your display. Useful when you want to browse with really low screen glow on your laptop.