nvim

nvim

TLDR

Open a file

>_ nvim [file]
copy

Enter text editing mode (insert mode)

>_ <Esc>i
copy

Copy ("yank") or cut ("delete") the current line (paste it with P)

>_ <Esc>[yy|dd]
copy

Undo the last operation

>_ <Esc>u
copy

Search for a pattern in the file (press n/N to go to next/previous match)

>_ <Esc>/[search_pattern]<Enter>
copy

Perform a regex substitution in the whole file

>_ <Esc>:%s/[pattern]/[replacement]/g<Enter>
copy

Save (write) the file, and quit

>_ <Esc>:wq<Enter>
copy

Quit without saving

>_ <Esc>:q!<Enter>
copy

Copied to clipboard
free 100$ digital ocean credit