Open URLs Quickly from BBEdit
If you're working on a bit of text (HTML or otherwise) in BBEdit, and you see a URL that you'd like to open, the fastest way is to Command-click it. Most BBEdit users probably already know this tip, but if you don't, it's a huge time-saver. (The same trick works in BBEdit's free little brother, TextWrangler.)
Written by
Adam C. Engst
Recent TidBITS Talk Discussions
- Alternatives to MobileMe for syncing calendars between iPad/Mac (1 message)
- Free anti-virus for the Mac (20 messages)
- iTunes 10 syncing iPod Touch 4.1 (2 messages)
- Thoughts about Ping (16 messages)
Published in TidBITS 997.
Subscribe to our weekly email edition.
- Apple to Investigate SuperDrive Issues
- iTunes 9.0.1 Fixes Important Bugs
- NetNewsWire for Mac and iPhone, Finally Updated
- Enable MMS on the iPhone in the United States
- Google Offers Push Gmail and Google Sync to iPhone
- Pantone iPhone App Offers Enjoyable Color Exploration
- New "Take Control of Mac OS X Backups" Explains Smart Backups
- Even More Hidden Refinements in Snow Leopard
- TidBITS Watchlist: Notable Software Updates for 28-Sep-09
- ExtraBITS for 28-Sep-09
- Hot Topics in TidBITS Talk for 28-Sep-09
Hack Microsoft Word's Page Up/Page Down Keys
Microsoft Word has always screwed up the Page Up, Page Down, Home, and End keys on the Mac. I believe - and am willing to quote chapter and verse from the Apple Human Interface Guidelines to support my belief - that they should, respectively, scroll up one screen, scroll down one screen, scroll to the top of the document, and scroll to the bottom of the document. And they should do all this without moving the bloody insertion point!
Before Visual Basic for Applications went away, I wrote some macros that did this and reassigned the key commands. In Word 2008, however, there's no VBA. So I finally figured out four one-line AppleScript scripts that bring back my desired scrolling behavior.
Copy each of these lines to a new document in AppleScript Editor (Snow Leopard) or Script Editor (Leopard) and save them in ~/Documents/Microsoft User Data/Word Script Menu Items, naming them, respectively, "Page Up", "Page Down", "Home", and "End" (the exact names are important for later on). Files in this folder show up in the scripts menu in Word, which is the first step.
tell application "Microsoft Word" to large scroll active pane of active window up 1
tell application "Microsoft Word" to large scroll active pane of active window down 1
tell application "Microsoft Word" to set vertical percent scrolled of active pane of active window to 0
tell application "Microsoft Word" to set vertical percent scrolled of active pane of active window to 100
Then comes the problem of how to assign these scripts to the associated keys. You can't use the Tools > Customize Keyboard command to assign keys to AppleScripts in Word. Microsoft's advice is to put some magic key-equivalent crud at the end of the script's file name (like "\smV" for Shift-Command-V, which I use for Paste Plain). But there's nothing to type for the Page Up, Page Down, Home, and End keys. And, unfortunately, there's no way to add Page Up, Page Down, Home, and End to any key in the Keyboard Shortcuts view of the Keyboard pane of System Preferences.
If you had a macro program like Keyboard Maestro, QuicKeys, or iKey, you could bind the scripts to the appropriate keys within Word. But what if you don't have such a program? Once again, "defaults write" saves the day. In Terminal, first check to see if Word is listed in the results of this command (be sure to copy and paste each of these commands as a single line):
defaults read com.apple.universalaccess com.apple.custommenu.apps
If you don't see "com.microsoft.Word" in there (you probably won't), add it with this command:
defaults write com.apple.universalaccess com.apple.custommenu.apps -array-add "com.microsoft.Word"
Then, the magic happens with this last command:
defaults write com.microsoft.Word NSUserKeyEquivalents '{"Home" = "\UF729"; "End" = "\UF72B"; "Page Up" = "\UF72C"; "Page Down" = "\UF72D";}'
It's probably best to quit and relaunch Word if it was running, but after all this, you should have Page Up, Page Down, Home, and End keys that scroll the text in view as expected, but without moving the insertion point.
Should you want to reverse the effects of these commands, the easiest way is to (in Snow Leopard) go into the Keyboard Shortcuts view of the Keyboard pane of System Preferences, select Application Shortcuts in the left-hand list, select Microsoft Word in the right-hand list, and click the minus button. (In Leopard, you'd look in the Keyboard view of the Keyboard & Mouse preference pane, and scroll down to the bottom to find Microsoft Word in the list of Application Keyboard Shortcuts.)
[Pete Resnick used to be a Macintosh programmer, and ostensibly knows something about email and the Internet. Now his entire career is reduced to giving presentations and talking to lawyers, hence his constant use of Microsoft Word.]
Typed notes are blended with recorded audio, video, and slides
to create notes that make more sense when you need them most.
Learn more at <http://www.usefulfruit.com/tb>!
I do not use Word but other editors.
I find the behaviour of Home, End, PgUp and PgDn keys in some editors on the mac extremely irritating.
Home should be: goto to start of line. etc.
The standard mac key for that Command+Left arrow is cramped and one key too many.
When one works on different systems, the Mac keys are the odd ones out. Once you get used to certain keys doing a certain thing, muscle memory etc. kicks in. It is impossible to change.
When I do a PgUp or PgDn I absolutely expect the insertion point to remain on screen. If it doesn't I try not use that specific editor.
The interesting thing is that Mac OS X provides a facility to change keybindings with the DefaultKeyBinding.dict.
You can also bind the PgUp and PgDn keys such that the insertion point stays on screen.
It would be most desirable if editors/word processors gave you the choice of behaviour for certain keys.
TextMate lets you work the way you want.
Berend
I wonder what would happen if you used something like Keyboard Maestro to remap the Page Up/Page Down keys to some other combination that doesn't require the fn key. Perhaps you have an intermittent connection with fn, but it manifests itself only when held down. I suppose you could also test this by using fn-Page Up/Down in another program and seeing if the keystrokes are lost there too.