This is my personal cheatsheet that I'm building because of my (most-likely) personal hatred towards VIM's community. Thank you vim community for the toxic, unwelcoming, unopenmindedness and egotistical behavior towards newcomers.
I just want to code using a lightweight editor that's matured enough for there to be plugins and not obsess towards the thing that I already can do with VScode but somehow "more optimized" and stuff like pErSoNaLiZeD DeVeLoPmEnT EnViRoNmEnT.
kickstart.nvim lacks wiki / documentation (Issue #3) while targetting newcomers to begin your Neovim journey.
Props to Helix editor to actually have a way better cheatsheet / docs for newcomers but sadly no plugins support yet :(
WARNING: Most commands are case sensitive and modifier sensitive!
wmeans pressingWkeyWmeans pressingSHIFTandWtogether (Capitalization!)^means pressingCTRLignoring capitalization;^WmeansCTRL + wWITHOUT SHIFT
Cursor movement: Arrow keys or hjkl, preferrably maximalize hjkl
h l
left right
j k
down up
w- jump to next word before punctuationW- jump to next wordb- jump to previous word before punctuationB- jump to previous word
--
gg- jump to start / beginning of fileG- jump to end of file (eof)
--
On VISUAL (v) or VISUAL-LINE V mode
>- indent to the right<- indent to the left
--
Find / Fuzzy / Regex / Regular Expression
/- Start finding stuff with Regex, end with Entern- Find next resultN- Find previous result
Replace - Highlight things that want to be replaced using Visual mode then
:s/<findterm>/<replaceterm>
-
^Wthen movement keys to focus / highlight different window -
:spor^W sto open new window below (split horizontally) -
:vsplitor^W vto open new window to the right (split vertically)
--
Note, you can prefix these with numbers
^W >- enlarges window size^W <- make window size smaller- ??? - minimize window (idt its even possible)
:Telescope find_files = <Space> sf Search files
:Telescope = <Space> sg Search grep
TBH just spawn a new tab / new window on your native terminal. Its not worth it.
Make a new window, run :terminal then enter Insert mode.
To make the terminal stop eating your input, switch to another window or CTRL + \ CTRL + N
<SPACE>rn- Rename Symbol, VSCode's F2 (vim.lsp.buf.rename)<SPACE>ca- Code Action, VSCode's CTRL +.(vim.lsp.buf.code_action)<SPACE>e- Show errors / warning / diagnostics / codelens pop up on cursor (vim.diagnostic.open_float)<SPACE>q- List all errors / diagnostic / warning / codelens on bottom | VSCode's Problems panel (vim.diagnostic.setloclist)gd- Go to Definition (vim.lsp.buf.definition)gr- Go to References (require('telescope.builtin').lsp_references)K- Show hover information (vim.lsp.buf.hover)gcc- Go Comment Linegcb- Go Comment Block - Try this if you're on React / Astro
Sidebar would need to be focused. If accidentally closed, run :NvimTreeOpen
g?- Toggle helpa- Create new file- Append an extra
/to create a directory
- Append an extra