neovim

Neovim for VSCode Users a cheat sheet

Posted on Wed Sep 25 2024
⊱―⊰

Prerequisites

Finding Files

vscode - cmd + p neovim - /

Scrolling

vscode - mouse lol neovim:

Start end of a line

vscode - n/a neovim:

Goto definition

vscode - f12 neovim - gd

Back / Forward

vscode - ui back/ forward buttons neovim - ctrl + o , ctrl + i

Save file

vscode - cmd + s neovim - :w

Close file

vscode - cmd + w neovim - :bd (buffer delete)

Seach File

vscode - double-tap word to select all , cmd + f neovim - viw (visual innner word) , y (yank) , / , cmd + v (use n and N to navigate between matches)

Seach Codebase

vscode - cmd + f neovim - viw (visual innner word), space , / , cmd + v

Selecting blocks of text

vscode - mouse lol neovim:

Selecting a whole line

vscode - mouse neovim - V (capital)

Refactoring

Multicursor editing

vscode - cmd + opt + shift +up/down

Moving lines up and down

vscode - opt +up/down neovim -

Surround a text block with something

vscode - select text with mouse and { etc neovim - select tes

Change symbol

vscode - f12 neovim -

Copy a whole line

vscode - mouse lol neovim - yy

Commenting blocks of code

vscode - cmd + / neovim - gc or ctrl + .

Undo/ Redo

vscode - ctrl + z / ctrl + cmd +z neovim - u / ctrl + r

Terminal

Open terminal

cmd + j

Git

vscode - built in source control panel

neovim: lazgit?

Nx

vscode - Nx extension

neovim:

Endpoint testing

vscode - Thunder client extension

neovim:

Most used vim commands

vai - select all inside , useful selecting a string of text V - select whole line and go into visual mode, useful selecting blocks of text

ci( / { [ etc - select everything inside some brackets

shift + k - lsp hover info - useful for getting typing info