Skip to content
Zeddnyx edited this page Jul 24, 2023 · 4 revisions

Welcome to the Znvim wiki!

shortcut neovim

| keybind | Description | |----------------------------------------| |:luafile % | (reload file without exit) |

Normal mode

Keybind Description
b move previous word
w move next word
Ctrl + o jump to old cursor
Ctrl + i jump to previous cursor
`` jump next/previous cursor
x delete current character
s delete and insert mode
dw delete the current word
dd delete the current line
5dd delete five lines
d$ delete to the end of line
d0 delete beginning of line
diw delete right word
dib delete left word
ciw/cib delete then insert mode
dit delete word by tag
di" delete word inside ""
di( delete word inside ()
Shift+D delete rest of line
o break down line
O break up line
Shift+A insert mode end of line
Shift+I insert mode start of line
a insert mode in right
i insert mode in left
u undo
Ctrl + r redo

Visual Mode

Keybind Description
yy copy entire line
3yy copy 3 line
p paste the text after the cursor
u change the market text to lowercase
U change the market text to uppercase
Shift+V select 1 line
ctrl + > add tab to right
gv reselect previous select

select and change multi word

ctrl+v - select specific word x - remove selected word ctrl+v - select again shift+i - then type a new word Esc - to save save and apply

Search and Replace

:s/search/replace (one word will be replace) :s/search/replace/g (replace word in one line) :%s/search/replace (replace entire file)

Buffer

:bn (move to the next buffer) :bp (go back to previous buffer) :bd (close buffer) :b# (move to the specified buffer (by number)) :ls (list all open buffers) :b file_name (move to a buffer (by name))

explore file

:Lex (open tree file) :vertical resize 30 (resize width tree file to 30%) gh (hidden dotfiles)

Split Screen

ctrl + w (hjkl) (move left, right, left, right) ctrl + w + c (close split screen)

Clone this wiki locally