I like using the Bash shortcuts while at the command line to move around and edit text. A sample of some commands from the link can be seen below:
Ctrl + a Go to the beginning of the line (Home) Ctrl + w Cut the Word before the cursor to the clipboard. Ctrl + e Go to the End of the line (End) Ctrl + p Previous command (Up arrow) Ctrl + n Next command (Down arrow) Alt + b Back (left) one word Alt + f Forward (right) one word Ctrl + f Forward one character Ctrl + b Backward one character Alt + d Delete the Word after the cursor. Ctrl + d Delete character under the cursor Ctrl + y Paste the last thing to be cut (yank)
It seems like some of these work while in Insert mode; for example
Ctrl + w or
Ctrl + u. However some don't; for example
Ctrl + y.
- How do I enable Bash shortcuts while in insert mode?
I'm running macOS:
ProductName: Mac OS X ProductVersion: 10.12.1 BuildVersion: 16B2657
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 16 2017 06:36:51) MacOS X (unix) version Included patches: 1-329 Compiled by Homebrew