17 private links
Key chords is the bane of keyboarding.
There are 3 types of keyboard shortcuts to invoke commands in software:
- ① Single key ➢ for example: 【F1】, 【⇞ Page △】.
- ② Key chord ➢ for example: 【Ctrl+c】, 【Ctrl+⇧ Shift+z】, 【Alt+F4】.
- ③ Key sequence of single keys or chords. ➢ for example: on Microsoft Windows, 【F10 e c】 for copy, or 【Alt+Space c】 to close window.
of these, in terms of efficiency and hand health (Repetitive Strain Injury), the single key is the best. Key sequence of single keys is second best. Key chord is the worst.
Key chord is the most hard on hand health, but is also conceptually the most convoluted.
i remember in around 1991, when i first learned about key chord on the Macintosh Classic. I remember thinking, it's strange. You have to hold ⌘ Cmd first, then press the key c, then, release c, then, release ⌘ Cmd. It must be in that specific order.
A more natural way is either key sequence, or real chords. Real chords, meaning, pressing several keys together but you don't have to worry about which to hold or release first. Stenograph machines are like that.
Emacs makes frequent use of the Control key. On a conventional keyboard, the Control Key is at the lower left corner of the keyboard, usually not very large and is pressed by the pinky finger. For those who use emacs all day, this will result in Repetitive Strain Injury. This page lists some tips on avoiding this pinky problem.
All i wanted, is to make Space and Tab and Newline chars visible.
However, the emacs whitespace-mode does much more than that. It is designed for tech geeking control freaks to tune every aspect of white space in his source code. The mode is filled with bells and whistles. It distinguishes tabs mixed with spaces, EOLs mixed with spaces, EOLs at beginning of file, EOLs at end of file, run on spaces at end of line, lines that has nothing to do with white spaces but is simply longer than 80 chars, etc. Each of these is rendered with different foreground, background, colors, so that they cannot possibly escape the notices of control freaks.
This page tells you how to setup emacs's whitespace-mode
(in emacs 23 or later), and how to use it.
whitespace-mode
renders {spaces, tabs, newlines} characters with a visible glyph. This feature is useful for working with “tab separated values” (TSV) that's commonly used format for importing/exporting address books or spreadsheets. It's also useful in whitespace-significant languages such as Python.
To use it, call:
whitespace-mode
→ toggle on/off, for current file.global-whitespace-mode
→ toggle on/off globally for current emacs session.
There is also whitespace-newline-mode
and global-whitespace-newline-mode
. They only show newline chars.
Emacs has a spell checking feature (flyspell-mode), that check spelling errors while you type, much like all other modern editors, word processors, email programs, or text box in browsers. However, emacs's spell checking feature is much worse than the spell checker in browsers or any commercial editor.