Skip to main content

Neovim config for personal use

Cyprian
Author
Cyprian
One day i will think before i speak and you shall be astounded, however that day is not today.
███╗   ██╗███████╗ ██████╗ ██╗   ██╗██╗███╗   ███╗
████╗  ██║██╔════╝██╔═══██╗██║   ██║██║████╗ ████║
██╔██╗ ██║█████╗  ██║   ██║██║   ██║██║██╔████╔██║
██║╚██╗██║██╔══╝  ██║   ██║╚██╗ ██╔╝██║██║╚██╔╝██║
██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║
╚═╝  ╚═══╝╚══════╝ ╚═════╝   ╚═══╝  ╚═╝╚═╝     ╚═╝

My editor is not an IDE. It's better.


The Setup
#

A custom Neovim configuration built on the AstroVim template, managed with lazy.nvim. The config lives in a lua/plugins/ folder structure and is designed around a productive development workflow with first-class Git integration via diffview.nvim.


Cheatsheet
#

Movement
#

KeyAction
wNext word start
eEnd of word
bPrevious word
0Start of line
^First non-blank character
$End of line
<C-d> / <C-u>Half page down / up
<C-f> / <C-b>Full page down / up
zzCenter cursor
gg / GTop / bottom of file

Insert Mode Entry
#

KeyAction
i / aInsert before / after cursor
I / AInsert at start / end of line
o / ONew line below / above + insert

Navigation Between Files#

KeyAction
<leader>ffFind files
<leader>fFFind all files (incl hidden/ignored)
<leader>fgFind git-tracked files
<leader>fwFind words across project
<leader>fbFind open buffers
<leader>foRecent files
<leader>bbChoose buffer from timeline
<C-o> / <C-i>Jump back / forward

LSP
#

KeyAction
KHover docs
gdGo to definition
gDGo to declaration
gyGo to type definition
grList references

Editing Essentials
#

KeyAction
u / <C-r>Undo / redo
v / VCharacter / line selection
gvReselect previous selection
y / yyYank / yank whole line
d / xCut / delete char under cursor
p / PPaste after / before cursor
> / <Indent / unindent
.Repeat last change
ciwChange inner word
diwDelete inner word
ci"Change inside quotes
ci(Change inside parentheses
ci{Change inside braces

File Tree
#

KeyAction
<leader>eToggle file tree
EnterOpen file
a / d / rAdd / delete / rename
m / y / pMove / copy / paste
qClose tree
<Tab> / <S-Tab>Next / previous source

Surround (mini.surround)
#

KeyAction
saAdd surrounding
sdDelete surrounding
srReplace surrounding
sf / sFFind surrounding right / left
shHighlight surrounding
snUpdate n_lines

Search & Replace
#

KeyAction
:%s/a/b/gReplace all in file
:%s/a/b/gcReplace with confirmation

Merge Conflicts (diffview.nvim)
#

KeyAction
<leader>moChoose OURS
<leader>mtChoose THEIRS
]x / [xNext / prev conflict (within file)
<Tab> / <S-Tab>Cycle conflicted files
Workflow: merge → :DiffviewOpen → navigate → resolve → save → :DiffviewClose → git add . && git merge --continue

Links#