The editor I use
The editor I use for bash scripting is the VI editor. In fact it is VIM, or Vi IMproved. The other options include gedit, nano and emacs. Any text editor will do the job.
You can invoke VI by typing vi in the shell.
vi
or you can use it followed by the name of the file you’re going to edit.
vi hello
VI’s steep learning curve usually deters many new comers. You have to remember various key commands to perform even simple tasks. However, once you get in touch with the basics, it’s quite easy to catch up and you will soon find how efficient working with VI is.
VIM is an improved version of VI which is far more intuitive than the former, for example you can use arrow keys to move around the text. It doesn’t make sense to work with VI when VIM is available. Once you install VIM (sudo apt-get install vim in debian-based distros), just invoking vi instead of vim will take you to VIM.
Two good tutorials for learning VI can be found here and here.
Filed under: Uncategorized | Leave a Comment


No Responses Yet to “The editor I use”