Essay sample library > HowTo: Save File in Vi / Vim Text Editor

HowTo: Save File in Vi / Vim Text Editor

2024-02-15 08:32:56

Just like the operating system, I'm new to Linux and UNIX. Create a file named demo.txt, save it with a vi text editor and close it. How to save files with vi

Vi or vim is a text editor with three modes: command mode, input mode, and ex mode. To create a new file, open a terminal and enter the following:

Vi / vim always starts up in command mode. You can return to command mode at any time by pressing the [Esc] key. To insert text, press i. To save and exit vi / vim, hold down the [Esc] key and enter ZZ.

To enter ex mode, press the [Esc] key and then press: (colon). For example, to exit vi to save changes, press [Esc],: (colon) and enter wq.

Vim is a command line text editor that is the choice of many developers, advanced users, or people like Cli who like me, so there are not many choices. This is a text editor based on the vi editor written by Bill Joey for the UNIX system in the 1970's. It inherits the basic functions such as vi's key assignment, but adds many functions to vim. If you just loaded vim, you would enter: i Enter the insert mode and start processing the file. When you are done, press the ESC key, enter:: to return to command mode, enter w to write to the file, or enter wq to finish writing. Looks like everything is too complicated right now? Then why use vim? As it was very fast I switched to vim, Atom even crawled a $ 3,000 laptop in a big project even on raspberry pie.

Vim is a free text clone developed by Bill Joy in 1976, a text editor, vi open source. It usually runs on a terminal, and when you first saw some code in Vim, it still looks like something people developed, long before the computer is actually human friendly. It is a clean interface for installing and finding packages, but fortunately I have created a Vundle which is a plugin manager (named Vundle) very similar to Ruby's Bundler. Once the installation is complete, you can add a new plugin from the GitHub repository that defines the storage plugin. For example: