« XP, 2G of Ram and Hibernate
| Linux Source Code Browsing »

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!
Bash shell
Firefox
Visual Studio
Windows Explorer
vi(m)
Mac OS X
QuickTime
More VI(M) powerups:
:set ic -Turn on ignore case for searches
Ctag commands:
:ta [tagname] - edit the file with tagname.
:po - pop to previous location
:ts [tagname] - list the tags that match
Ctag keystrokes:
Ctrl-] - jump to name under cursor
Ctrl-T - pop to previous location
To use above you must have previously built ctags for your source project. For example:
ctags -R *.c *.h
Power searching with Firefox using
smart keywords. Once you use this, you won't go back.
I've extended this to do specialized Google searches, where I want to search only one web site. I'm often looking up API documentation on MSDN, and I don't want other sites to show up in the search results. So, I'll type a query like this into Google:
CreateWindowEx site:msdn.microsoft.com
But typing all that site:... junk is a pain, and I always seem to mistype the word Microsoft. So, I've combined the site specific search with a Firefox smart keyword so that you can type the following into the Firefox address bar to get the same results:
ms CreateWindowEx
To do this:
1. Go to Google and right click inside the search box.
2. Choose "Add a Keyword for this Search".
3. In the Name field, type MSDN search (this name will be displayed in the bookmarks menu).
4. In the Keyword field, type ms.
5. Click OK.
6. Go to the Bookmarks menu in Firefox, and right click on MSDN Search and select Properties.
7. For the Location field, enter this string: http://www.google.com/search?q=%s+site%3Amsdn.microsoft.com
8. Click OK.
The key part is the q=%s in the search query, and that will get filled in with everything after the ms keyword that you type in the address bar.
Paul, March 8, 2007 11:55 PM: Paul, March 9, 2007 03:32 PM:Gmail power select: to select multiple consecutive email threads, click the Select checkbox of the first thread, then hold down shift and click the Select checkbox of the last thread. Gmail will select (or unselect) all the threads between the two.
Paul, April 11, 2007 01:45 PM:Mac OS X comes with retarded key bindings for somethings, like having Home/End go to the start/end of the document, instead of start/end of the line.
J, April 30, 2007 03:50 PM:On Mac OS X, hold down ctrl and use the scroll wheel of the mouse, or the two finger track pad scroll. It magnifies the screen and you can scroll around the area magnified.
J, April 30, 2007 03:58 PM:To list just the subdirectories of a directory in Linux:
ls -d */
find . -name "*.c" | xargs grep "TODO"Paul, May 26, 2007 08:38 PM:
Windows Update is really convenient, except when an update is installed that requires a restart of the computer. A dialog then gives two choices: "Restart Now" or "Restart Later". If you choose later, it'll pop up the dialog box 10 minutes later and keep doing so until you finally reboot.
Here is how you can turn off this ridiculous nagfest.
Paul, June 9, 2007 11:19 PM: Paul, June 9, 2007 11:58 PM:Web development cheat sheets, from Mr. Mosaic + Netscape himself!
Paul, January 23, 2008 05:58 PM: Paul, October 28, 2008 03:55 PM:Even better home and end key handling for Terminal.app.
Paul, November 20, 2008 03:34 PM:When using emacs and X11 on the Mac, you have to do some key remapping so that the meta (alt) key works properly:
1. In X11 preferences: uncheck follow system keyboard layout.
2. In X11 preferences: uncheck enable key equivalents under X11
3. Create the file ~/.Xmodmap, and add the following lines to it:
clear Mod1
clear Mod2
keycode 63 = Mode_switch
keycode 66 = Meta_L
add Mod1 = Meta_L
add Mod2 = Mode_switch
Go this from here.