Member-only story
Introduction to Unix/ Linux Text Editor vi
4 min readJan 28, 2024
Vi, short for “visual editor,” is a screen-oriented text editor originally developed for Unix systems. It offers both command mode and insert mode for editing text efficiently.
viis a text editor that is commonly found on Unix/Linux systems. It is known for its powerful and versatile capabilities, making it a preferred choice for many users.- On some systems,
viis linked tovim(Vi Improved), and both are mentioned asvim(1)andvi(1). The(1)refers to the section number of the man page where information about the command can be found. - Setting the
VISUALandEDITORenvironment variables can be useful to specify the default editor to be used by other programs. For example:
export VISUAL=vim
export EDITOR=vimvimtutoris a helpful interactive tutorial for learning the basics of thevimeditor. Runningvimtutorfrom the command line launches a guided lesson to familiarize users with various commands and features ofvim. It's an excellent resource for those new tovim.
Basic vi Commands:
1. Entering Vi:
- To start Vi, open a terminal and type
vifollowed by the name of the file you want to edit.
vi filename.txt