From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Search and replace in Vim - Linux Tutorial
From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Search and replace in Vim
- [Presenter] Searching and replacing text in VIM is quite easy. Let's start VIM with a new text file by typing in vim, space, searchfile.txt and hitting enter. Let's go into insert mode by pressing I and then adding some text. I'm going to add line one, line two, line three, line four, and then the last line I'm going to type in line space line and hit enter. Let's move our cursor to the top of the file. To search from your current position to the end of the document, exit insert mode by pressing escape, press forward slash to search, and then start typing. I'm going to search for the word four and hit enter. If you want to search from your current position towards the beginning of the document, then press the question mark and start typing. So I'm typing in question mark three and hitting enter. Let's search for something that we have more than one of like the word line. Escape, forward slash, line, hit enter.…
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
-
-
-
-
-
-
-
-
-
-
-
Understand the differences between basic and extended regular expressions3m 38s
-
Matching characters and words with regexes3m 5s
-
Specifying occurrences with regexes1m 56s
-
Alternation and grouping with regexes3m 21s
-
Back references and subexpressions1m 48s
-
Search text using regular expressions5m 31s
-
Use regular expressions to delete, change, and substitute text5m 16s
-
Awareness of Emacs, Nano, and Vim2m 49s
-
An introduction to Vim3m 33s
-
Edit text in Vim2m 45s
-
Search and replace in Vim2m 26s
-
-
-
-
-