Ctrl-x Ctrl-e
TIL you can edit complex CLI commands using vi by pressing Ctrl-x Ctrl-e
in your terminal. This operation opens the current command in your default editor (usually vi or nano).
Editing CLI command in vi
fc
command
TIL you can edit CLI’s commands history in vi/vim mode using fc
command.