Advanced text handling tips in OS X
If OS X applications are built with Apple's Core Text framework, then there are a number of text-handling shortcuts that may be used in these applications.
A short while ago I discussed some, which included the use of the Option and Command keys for selecting various portions of text in a document.
In response to this article, a couple of MacFixIt readers wrote in with extra tips and suggestions, some of which may be useful for people who regularly compose text. Keep in mind that not all text editors are built to handle these options, but those that use Apple's Core Text libraries should be able to use at least some of them.
- Ctrl-A --> Move to the beginning of the current paragraph. This will not repeat for more than the current parragraph if held down.
- Ctrl-E --> Move to the end of the current paragraph. Again, this will not repeat if held down.
- Ctrl-F --> Move right one character
- Ctrl-B --> Move left one character
- Ctrl-P --> Move up a line
- Ctrl-N --> Move down one line
- Ctrl-V --> Move to end of the document
NOTE: These options can be combined with the Shift key to select items in the direction of movement
- Ctrl-D --> Delete forward
- Ctrl-H --> Delete backward
- Ctrl-K --> "Kill," or clear text from cursor going forward
- Ctrl-Y --> "Yank," or bring the killed text back
- ctrl-T --> Drag a character forward (transpose)
- ctrl-O --> Push text in front of cursor down a line (the same as pressing Return, but keeping the cursor where it is)
- ctrl-L --> Flash selection (highlights it yellow--there seems to be absolutely no purpose to this)
Beyond the use of keyboard shortcuts are a couple of other options for managing text in a document.
Multiline box selection
If you have a document with multiple lines, you can press the Option key and the mouse cursor will turn into a cross. You can then click and drag this cross over the text to box-select multiple lines of text. This is a neat feature in OS X, but does seem to be a bit of a solution in search of a problem. One option where it might apply is in preserving the formatting of text around in-line images that may be included in a selection.
Dragging text selections
Apple's Core Text programming libraries treat the current text selection as an independent object, so if a program has been coded to use Core Text, then you can perform a number of actions with any text selection in them. With the text selection of your choice, you can drag it to another location within the current document for quick shuffling and reorganization of ideas, or drag it to another document to copy it there. While the default dragging behavior is to move the text around within a document, if you hold the Option key, you will copy the text to the new location.
In addition to dragging text around or between documents, if you drag it to a Finder window or the desktop, you'll create a text clipping, which is treated as a saved clipboard item. The text clipping can then be dragged into the body of a text document to paste its contents at the desired location, or it can be opened so you can copy the entire contents or a portion of it to the clipboard. Text clippings can also contain images, so if you drag an selection of text and in-line images to the Finder, the resulting clipping will include those images when you drag it into another document.