Neovim Habits Layer

Up: Neovim Config Tutorial Down: plugins

Before the plugins arrive, the editor already has manners. This layer is where Neovim learns how to sit, look around, clean up, and not panic.

Settings

lua/settings.lua is full of small sensory choices:

Setting areaIntent
BuffersHidden buffers stay alive, so switching files is cheap.
SplitsNew windows open right and below, matching reading direction.
SearchSmartcase and live substitution previews make search safer.
UIRelative numbers, cursorline, whitespace markers, and high scrolloff keep location obvious.
StateBackups, swap, and undo live under Neovim data paths.
DiagnosticsVirtual text, signs, and sorted diagnostics keep errors visible without owning the screen.
ProvidersUnused Perl and Ruby providers are disabled to reduce startup noise.

The config also disables netrw because file management is handed to Oil.

Keymaps

lua/keymappings.lua edits Vim muscle memory without turning the keyboard into a puzzle box.

Useful patterns include:

Key ideaWhy it exists
Y yanks to end of lineMakes Y behave like D and C.
Q disabledAvoids accidental Ex mode.
n and N recenterSearch results land in the middle of the room.
Esc clears searchThe screen calms down quickly.
Terminal window navigationTerminal buffers behave like normal splits.
Visual J and K move blocksRearranging code stays tactile.

Command abbreviations fix common capitalized saves like :W and :Q.

Autocommands

lua/autocommands.lua is the caretaker:

AutocmdWhy it exists
Yank highlightConfirms that a yank happened.
Disable diagnostics in node_modulesAvoids screaming inside vendored dependency forests.
Filetype fixesTeaches Neovim about Fortran, R Markdown, notebooks, shell variants, Salt, and more.
Markdown wrapWriting notes feels like prose, not log output.
q and Esc close utility buffersHelp, quickfix, and test panels leave politely.
Python write hookRuns import cleanup helpers when available.

These habits are not flashy. They are the floorboards. You notice them mostly when they are missing.

Related: bootstrap, editor plugins