Vim Basics in 6 Minutes - Free Vim Tutorial for Beginners. All you need to know about using vim to edit files. Vim is a great text editor in Linux and is extremely useful to know how to use.
TIMESTAMPS
0:00 Intro to Vim tutorial
0:09 Open a file in Vim
0:20 Move around in Vim
0:27 Save file in Vim
0:37 Quit Vim
0:43 Save and quit Vim
0:49 Quit vim without saving
0:58 Vim modes
1:45 Undo in Vim
1:56 Redo in Vim
2:03 Go to end of line in Vim
2:11 Go to beginning of line in Vim
2:17 Advanced navigation in Vim
2:55 Insert mode in Vim
3:26 Delete shortcuts in Vim
4:05 Visual mode in Vim
4:42 Advanced Vim commands
5:45 Conclusion and thanks!
Vim Cheatsheet:
vim filename = open file for editing in vim (create file if doesn't exist)
arrow keys = cursor movement
:w = write
:q = quit
:wq = write quit
:q! = Quit without saving
Esc = normal or “command” mode
u = undo
Ctrl + r = redo
$ = go to end of line
0 = beginning of line
w = forward a word
b = back a word
G = Bottom of file
1G = Top of file
Ctrl-D page half-page down
Ctrl-U page half-page up
i = Insert mode
I = insert at beginning of line
A = insert at end of line
o = new line insert below
O = New line insert above
x = Delete character
dd = Delete line
v = visual mode
Then highlight text
y = yank (copy)
c = change (cut)
p = paste (other mode)
d = delete, etc.
:set number
Go to line
:19 line number,
/searchterm = search (is case sensitive)
n = next
N = Previous
:%s/replaceme/replacewith/g = search and replace
Good luck with your vim.
![](https://s2.save4k.ru/pic/I6C-fcuW2KU/mqdefault.jpg)