sudo apt install neovim
rm -rf ~/.config/nvim rm -rf ~/.local/share/nvim rm -rf ~/.cache/nvim
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get update
nvim {name_file}
open the file and if it does'nt exist create a blank one.:q
quit vim:q!
quit and dismiss all the changes:!{command}
execute a terminal command:wq
Write and quit:bd
Quit buffer
:
starts a command (normal mode)ESC
get out of the last mode- 'i` enters the insert mode, you can insert text before the cursor
- `a' insert mode after the cursor
o
insert mode on a new lineI
insert mode beginning of the lineA
insert mode end of the lineO
insert mode new line abovev
visual modeV
visual line mode (select by lines)Ctrl + v
visial block moded
delete selectiondd
delete whole lineD
delete from the cursor trhough the endy
copyyy
copy the whole linep
pasteP
paste above the line or before the cursorc
changecc
Insert mode to change all of the liner
Replace mode
u
In normal mode, undid the action{number}u
normal mode, number of undos backctrl+r
normal mode, redo{number}ctrl+r
nomal mode, number of redosw
jump to the next wordW
jump to the next word ignoring special charactersb
jump backwardsB
jump backwards ignoring special charactersdw
delete next word{number}dw
delete number of words{number}db
delete number of words backwardsdiw
delete in a wordciw
change in a wordd0
delete every thing to the startd$
delete every thing to the endyiw
yank in a word, copy the word
ci{simbol}
change innter text of the simbol.
repeat the last command that you execute
JKLH
optional arrowsarrow number
move the cursor number of times on the direction of the arrowe
end of the word0
Begin of the line$
end of the line%
jump to the end/start of a simbol (){}....t{simbol}
jump position before the simbolT{simbol}
jump backwards before the simbolf{simbol}
(find) jump to position of the simbolF{simbol}
jump backwards to position of the simbolgg
Jump begining of the fileG
jump to the end of the file{number}G
jump to the number line:{number}
jump to the number line
:vsplit
Vertical split:split
Horizontal split
>>
Indentation to the rigth<<
Indentation to the left==
Automatic indentationgg=G
Automatic indentation from the begining through the end
:/{word}
search wordn
next wordN
backward jump#
move up with the word selected (visual mode)*
move down with the word selected (visual mode)
:%s/{word}/{newWord}/g
replace all the occurences of word to newWord:s/{word}/{newWord}/g
replace occurences of word on a selected text
m{caracter}
mark a place on the code with the caracter alias'{caracter}
go to the placezz
center the code
:reg
see the registeris"{registerNumber}p
choose a register and paste it{registerNumber}yy:reg
overwrite register on register number with new commandq{caracter}
record a macro ->q
quit macro recording`@{caracter}
execute the macro
settings permanent create a file at vim ~/.config/nvim/init.lua
create folder for configurations on lua/{user}