Fixing some usability issues with Mac OS X Lion

Okay, now that I had a chance to play around with Mac OS X Lion for a few days I also ran into some issues and thought I'd write up how to fix some of them.

Safari remembering the last open tab

I'm a web developer, and as such it's normal to have 10-15 tabs open in each of the 3 major browsers of each platform (Safari/Internet Explorer, Chrome and Firefox). I don't close these tabs, I just exit the application (Cmd+Q on a Mac) and expect to be greeted with a fresh and empty window when I restart the browser.

However, Safari remembers the last tabs depite me setting up as to open new windows with an empty page. Turns out that there is a system-wide settings that makes applications remember their last state. It's in System Preferences > General: "Restore windows when quitting and re-opening apps".

For me, this option is nonsense. If I want to retain the state of an App, I don't close it. I can easily put my Mac into Hibernate mode if I want to turn it off without shutting it down.

Edit: Thanks to Matt Isenhower for showing a way to disable it per app:

defaults write NSQuitAlwaysKeepsWindows -int 0

Disable Auto-correct

One feature I love in iOS is the autocorrect feature, since typing on a touchscreen keyboard is tedious and error prone. However, on a Desktop machine with a real keyboard it's infuriating as auto-correct tries to correct some words that simply aren't wrong. On a Desktop, I expect spell checking to draw squiggly lines, not to auto-correct.

In Safari (and possibly other apps), go to Edit > Spelling and Grammar and untick "Correct Spelling Automatically".

For some strange reason, that option was greyed out (and ticked) on my MacBook Pro. As a Plan B, disable it system wide in System Preferences > Language & Text > Text.

No article about auto-correct without a link to Damn you, Auto Correct!

Proper Color Scheme for the Terminal

Let's face it, the Mac OS X Terminal colors are ugly. As a developer, I spend a lot of time in the Terminal and use many apps/scripts that make use of ANSI Colors. Also, I use vim a lot. The default scheme:

Up until Lion, we needed a hack to change the font colors (SIMBL + TerminalColours). In Lion, Apple finally allows us to customize them. So grab the IR_Black theme for Lion for a really nice color scheme.

Bonus Tip: The theme is also available for TextMate.

Make Home, End and Del work in the terminal

I use a normal Keyboard on my Mac, specifically the Microsoft 4000. However, pressing HOME or END in the Terminal doesn't do anything, but I expect those keys to go to the beginning/end of a line.

In the Terminal preferences, open the Keyboard tab, select HOME and for the string to send, press CTRL+A. It should show up as \005. For END, press CTRL+E which shows up as \005.

For Del to work, press CTRL+ALT+D which shows up as \004.

Comments (4)

AndersonJuly 24th, 2011 at 08:22

I like this post a lot! I did similar tweaks post-installation.

Bob J.July 28th, 2011 at 17:11

Now, how to bring back color to the Finder and app windows, interface commands, and icons?

Kevin DeGraafAugust 25th, 2011 at 16:28

Useful post!

FYI, CTRL-A is 01, not 05.

Kevin DeGraafAugust 25th, 2011 at 16:30

Hmm, WordPress seems to have mangled my comment. CTRL-A should be "backslash zero zero one" rather than "backslash zero zero five". 🙂