From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Edit text in Vim - Linux Tutorial
From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Edit text in Vim
- [Instructor] Before we start talking about editing text in Vim, let's talk about undo and redo. Let's start Vim with a new text file by typing Vim space editfile.txt and hitting enter. Go into insert mode by pressing I and add some lines. I've added line one, line two and line three. If we want to undo changes, we'll need to press escape U. Pressing escape takes us out of insert mode and into command mode. Pressing U will undo the changes. Press escape U. You can see our three lines are now gone. To redo a change, go to command mode and press control R. So press escape again and then press control R. Then we can see that we redid the changes. Now let's talk about editing in Vim. We'll cut, copy, delete and paste in command mode. Move your cursor to a line of text and press escape to go to command mode. To cut text we'll use the C key. To cut a letter, we'll type CL, to cut a word, we'll type CW, and to cut a line, we'll…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Understand the differences between basic and extended regular expressions3m 38s
-
(Locked)
Matching characters and words with regexes3m 5s
-
(Locked)
Specifying occurrences with regexes1m 56s
-
(Locked)
Alternation and grouping with regexes3m 21s
-
(Locked)
Back references and subexpressions1m 48s
-
(Locked)
Search text using regular expressions5m 31s
-
(Locked)
Use regular expressions to delete, change, and substitute text5m 16s
-
(Locked)
Awareness of Emacs, Nano, and Vim2m 49s
-
(Locked)
An introduction to Vim3m 33s
-
(Locked)
Edit text in Vim2m 45s
-
(Locked)
Search and replace in Vim2m 26s
-
(Locked)
-
-
-
-