In this lab, you will edit a text file using vim.
| Resources | |
|---|---|
| Machines: | desktopX |
Outcomes
A successfully edited text file.
A working student account on desktopX.
Log into your desktopX system as student and
open a terminal.
Open the (new) file
/home/student/vim-practice.txt in
vim. You do not have to create this file first.
[student@desktopX ~]$vim vim-practice.txt
Insert the following text:
This is my vim practice file. There are many like it, but this one is mine.
Press i or a to go into insert mode.
Type the text shown previously.
Press Esc to go back into command mode.
Insert a new line at the bottom with the following contents:
More lines, I want more lines!
Press o to open a new line beneath the current one and immediately switch to insert mode.
Type the line to be added.
Press Esc to go back into command mode.
Save and quit your file.
From command mode, enter :wq, then
press Enter.