Learn vi/vim editor basic

Опубликовано: 29 Март 2026
на канале: Sharad Chhetri
72
2

Learn vi/vim editor basic and start editing files in linux/unix terminal. One of the most powerful file editing tool in Unix based Operating System.

Timestamp
01:10 Create blank files. Save and quite (forcefully) the file.
05:03 Insert (i), to write contents in file.
11:06 Delete lines (dd)
12:37 Paste (p)
13:34 Undo (u)
14:47 Copy (yy)
17:05 Cursor to end of the file (shift+G)
17:24 Cursor to beginning of file (gg)
17:45 Remove characters(x)
18:28 Undo(u)
18:45 Redo(ctrl+r)
19:05 Set line number(:set number)
19:48 Unset line number(:set nonumber)
21:15 Delete blank lines(:g/^\s*$/d)
22:58 Search Keyword (:/search_keyword) and Replace the keyword with new keyword in file (:%s/keyword_1/replace_by_keyword/g)
25:55 Delete lines wherever finding the Keyword at the end of lines. (:g/keyword$/d)
27:56 Delete lines wherever finding the keyword at the start of lines (:g/^keyword/d)
28:30 Extra Gyan/Knowledge :)
29:14 Demo of forceful exit after saving the /etc/sudoers file.