Bash command line editing using vim
I was thinking that it’d be really cool if there is a way to edit my bash shell commands using vim. So, one of my friends told me about a pretty cool command called fc. It is basically a way to fix your last run command in a text editor like vim. All you have to do is to type fc in the command line. Then, you can use vim to type whatever command you want.
After a little bit more of research, I figured that you can do the following:
set -o vi
This will enable you to use vim editing facilities at the command line itself. Just hit Escape and you’ve got vim at the shell
.
Happy coding
Please, share your thoughts !!
posted: 09 February 19
under: Cool Hacks, Linux, Shell, Vim
great tip.
It’s already in my .bashrc