From the course: Learning Vim

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Save and quit

Save and quit - vi Tutorial

From the course: Learning Vim

Start my 1-month free trial

Save and quit

- [Instructor] Let's open Vim with a new file and write some text, so Vim learn.txt. Hit i for insert mode, and then write some text. "The trick to learning is enjoying." This quote is attributed to the physicist Richard Feynman. Now that you're happy with what you wrote, you're glad to save it. This means switching back to normal mode by hitting escape or control + c, and then writing column w enter. If the file doesn't exist, Vim will create it while you write it. You'll see at the bottom a message that Vim wrote the file. This area is called the status line. That's it. You wrote the file. If you'd like to write to a different file, you could specify the file to write as a parameter to the w command. W stands for write, so column w learn-rf for Richard Feynman .txt and enter. This will create a file called learn-rf.txt. However, you're still editing learn.txt, and if you'd like to work on learn-rf.txt, you'll need to switch to it explicitly either by quitting Vim and opening the new…

Contents