005 - How To Use Vi (Vim) : Command Line Based Text Editor For Linux

Published: 12 March 2021
on channel: CommandLine
9,697
10

0:00 Introduction to Vi/Vim
3:42 Three modes of Vi (Input, Command and Ex)
17:55 Search and Replace feature of Vi

In this video, we will look into the #Vi (Vim), one of the most common and powerful #TextEditor in #Linux. We will practice some of the most useful commands in Vi which include delete characters, words, lines, search for words in lines, copy multiple lines and paste it, work on multiple files at the same time and call them using buffer number, copy and paste lines between multiple files, search words (with and without case sensitivity) and search and replace words using substitute command. We will also look into one of the use case of Vi search function for system admins.

I forgot to mention couple of commands in the video which I think would be helpful and worth mentioning here.

In Command mode

I (uppercase i) It will insert at the beginning of the current line (where cursor is)
J (uppercase j) It will join the current line with the next one (move next line up)

In Search and Replace

The dot ( . ) character indicates the current line and the dollar sign ( $ ) indicates the last line. So, to search and replace a word from current line to the last one, you would need to type following.
:.,$s/find_word/replace_with_word/g


Watch video 005 - How To Use Vi (Vim) : Command Line Based Text Editor For Linux online without registration, duration hours minute second in high quality. This video was added by user CommandLine 12 March 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 9,697 once and liked it 10 people.