The most useful shortcuts for navigating and editing text in terminal.
Navigation
Keybinding | Action |
---|
Alt + f/b | Move cursor forward/backward one word |
Ctrl + f/b | Move forward/backward one character |
Ctrl + a/e | Move cursor to beginning/end of line |
Ctrl + xx | Alternates the cursor with its old position |
Editing
Keybinding | Action |
---|
Alt + d | Delete next word |
Alt + Del | Delete previous word |
Ctrl + w | Delete previous word |
Ctrl + d | Delete character under cursor |
Ctrl + xu | Incremental undo |
Ctrl + xe | Edit in the $EDITOR program |
Ctrl + xv | Edit in vi mode |
Ctrl + x + Ctrl + * | Expand * to all items in the current directory |