Swap two characters in Emacs
In GNU Emacs, press Ctrl+T on Mac, Windows, Linux.
EscF1F2F3F4F5F6F7F8F9F10F11F12PrtScScrLkPause
`1234567890-=deleteInsHomePgUp
TabQWERTYUIOP[]\DelEndPgDn
CapsASDFGHJKL;'return
ShiftZXCVBNM,./Shift↑
fnctrloptcmdcmdopt←↓→
EscF1F2F3F4F5F6F7F8F9F10F11F12PrtScScrLkPause
`1234567890-=BkspInsHomePgUp
TabQWERTYUIOP[]\DelEndPgDn
CapsASDFGHJKL;'Enter
ShiftZXCVBNM,./Shift↑
CtrlWinAltAltWinMenuCtrl←↓→
EscF1F2F3F4F5F6F7F8F9F10F11F12PrtScScrLkPause
`1234567890-=BkspInsHomePgUp
TabQWERTYUIOP[]\DelEndPgDn
CapsASDFGHJKL;'Enter
ShiftZXCVBNM,./Shift↑
CtrlSuperAltAltSuperMenuCtrl←↓→
See it happen Press the shortcut above, or
More Emacs shortcuts: editing
| Action | Mac | Windows | Linux |
|---|---|---|---|
| Delete the next character | CtrlD | CtrlD | CtrlD |
| Delete (kill) the next word | OptionD | AltD | AltD |
| Delete (kill) the previous word | OptionBackspace | AltBackspace | AltBackspace |
| Kill to the end of the line | CtrlK | CtrlK | CtrlK |
| Set the mark (start a selection) | CtrlSpace | CtrlSpace | CtrlSpace |
| Select the whole buffer | CtrlX,H | CtrlX,H | CtrlX,H |
| Cut (kill) the selection | CtrlW | CtrlW | CtrlW |
| Copy the selection | OptionW | AltW | AltW |
| Paste (yank) | CtrlY | CtrlY | CtrlY |
| Replace the paste with an older kill | OptionY | AltY | AltY |