RSS Amplifier

.dotfiles · Apr 21, 2026

Neovim Options: The Most Common Ones

0
Sign in to vote or save

Adib Hanna · .dotfiles

One of the fastest ways to make Neovim feel like your editor is to understand options.

Options control the editor’s behavior: how text is displayed, how indentation works, how search behaves, where splits open, whether undo history persists, and much more.

This article focuses on the options you will see in many real-world configs. “Most used” is not an official Neovim ranking, so treat this as a practical list of common, high-value options that many people set early in their setup.

Neovim options come in a few scopes:

  • global: affects the whole editor

  • window-local: can differ per window

  • buffer-local: can differ per buffer

In Lua, the most common ways to set them are:

vim.o.ignorecase = true      -- like :set, affects current scope
vim.wo.number = true         -- window-local option
vim.bo.expandtab = true      -- buffer-local option
vim.opt.scrolloff = 8        -- ergonomic Lua option interface

For list- and map-style options, vim.opt It is usually the nicest interface:

vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
vim.opt.wildignore:append({ "node_modules", ".git" })

If you want local behavior explicitly, use:

vim.opt_local.wrap = true
vim.opt_global.ignorecase = true
vim.wo.number = true

Shows the absolute line number for each line.

Why people use it:

  • easier navigation

  • easier code discussion

  • easier error reference

This is one of the most common window options in Neovim configs.

vim.wo.relativenumber = true

Shows line numbers relative to the cursor line.

Why people use it:

  • makes motions like 5j, 3k, d4j, y2k more intuitive

  • combines well with normal-mode movement

A very common combo is:

vim.wo.number = true
vim.wo.relativenumber = true

That gives you an absolute number on the current line and relative numbers around it.

vim.wo.numberwidth = 4

Controls the minimum width of the number column.

You usually do not need to change this unless your layout feels cramped or you work in huge files a lot.

These options are among the most important because they affect how code is inserted and displayed.

vim.bo.tabstop = 4

Controls how wide a literal tab character is displayed.

Important:

  • This is about the display width of actual tab characters

  • It does not, by itself, define indentation behavior for all editing actions

If a file literally contains tab characters, tabstop changes how wide they look.

vim.bo.shiftwidth = 4

Defines how many columns count as one level of indentation for operations like >>, <<, and various indent features.

In practice:

  • If you indent code by 2 spaces, use shiftwidth = 2

  • If you indent by 4 spaces, use shiftwidth = 4

vim.bo.softtabstop = 4

Controls how <Tab> and <BS> behave in Insert mode.

This is about the editing feel of tabbing, not the visual width of existing tab characters.

A common pattern is:

vim.bo.tabstop = 4
vim.bo.shiftwidth = 4
vim.bo.softtabstop = 4

That keeps visual width, indent width, and insert-mode tab behavior aligned.

vim.bo.expandtab = true

Makes pressing <Tab> insert spaces instead of a literal tab character.

This is one of the most commonly set buffer options because many codebases prefer spaces over tabs.

A common combination:

vim.bo.expandtab = true
vim.bo.tabstop = 2
vim.bo.shiftwidth = 2
vim.bo.softtabstop = 2

That gives you “2-space indentation using spaces.”

vim.bo.autoindent = true

Copies the current line’s indentation when you start a new line.

This is a very useful baseline option and one of the simplest ways to make editing feel better immediately.

vim.bo.smartindent = true

Adds simple indentation logic for C-like languages.

This can be useful, but it is worth knowing that many modern setups rely more on:

  • filetype plugins

  • Treesitter-based indentation

  • LSP formatting

  • formatter tools

So smartindent It is common, but not universal.

These are some of the best “quality of life” options in the editor.

vim.o.ignorecase = true

Makes searches case-insensitive.

So /foo can match:

  • foo

  • Foo

  • FOO

This applies to normal search and also affects some completion behavior.

vim.o.smartcase = true

Works with ignorecase.

Behavior:

  • If your pattern is lowercase, the search is case-insensitive

  • If your pattern contains uppercase letters, the search becomes case-sensitive

This is one of the most common search combinations:

vim.o.ignorecase = true
vim.o.smartcase = true

It feels natural because lowercase searches stay loose, while uppercase searches become precise.

vim.o.hlsearch = true

Highlights all matches from the last search pattern.

Why people like it:

  • You can see all matches at once

  • easier refactoring and scanning

Why do some people disable it?

  • It can feel visually noisy

A common compromise is to leave it on and use:

:nohlsearch

When you want to clear the highlight temporarily.

vim.o.incsearch = true

Shows matches as you type the search pattern.

This gives search a more interactive feel and is widely considered one of the nicest default behaviors.

vim.wo.wrap = false

Controls whether long lines wrap visually.

When on:

  • long lines continue on the next screen line

When off:

  • lines stay on one visual line, and the window scrolls horizontally

A lot of coding setups prefer:

vim.wo.wrap = false

Wrapped code lines can make the structure harder to read.

For prose or markdown, many people prefer wrap = true.

vim.wo.linebreak = true

When wrapping is enabled, this breaks long lines at nicer boundaries instead of in the middle of a word.

This is especially useful for:

  • markdown

  • text notes

  • prose writing

Common writing-oriented combo:

vim.wo.wrap = true
vim.wo.linebreak = true
vim.wo.breakindent = true

When a wrapped line continues visually, keep the continuation indented.

This makes wrapped text much easier to read, especially in nested structures or prose with indentation.

A very nice text-editing combo is:

vim.wo.wrap = true
vim.wo.linebreak = true
vim.wo.breakindent = true
vim.wo.scrolloff = 8

Keeps a minimum number of screen lines above and below the cursor.

This is one of the most widely used comfort settings in Neovim configs.

Why people like it:

  • The cursor is not glued to the top or bottom of the window

  • easier to keep context while moving

Common values:

  • 4

  • 8

  • 10

vim.wo.sidescrolloff = 8

The horizontal version of scrolloff, used mainly when wrap is off.

Useful if you work with long lines and do horizontal scrolling.

vim.wo.cursorline = true

Highlights the current cursor line.

Why people use it:

  • easier to track the current line in dense code

  • useful on large monitors

  • especially nice in splits

Tradeoff:

  • It can add visual weight, and the docs note it can slow redraw somewhat

Still, it is a very common option.

vim.o.splitbelow = true

Makes horizontal splits open below the current window.

Without it, new horizontal splits open above.

Most people who set this feel it matches natural spatial expectations better.

vim.o.splitright = true

Makes vertical splits open to the right of the current window.

This is another extremely common preference.

Together:

vim.o.splitbelow = true
vim.o.splitright = true

This is one of the most common “early config” choices in Neovim.

vim.wo.signcolumn = "yes"

Controls when the sign column is shown.

Signs are used by things like:

  • diagnostics

  • Git signs

  • breakpoints

Why do people often set it to "yes"?

  • prevents text from shifting left and right when signs appear or disappear

This is especially helpful when using LSP diagnostics.

vim.wo.list = true

Turns on “list mode,” which makes certain whitespace visible.

By default, it can show things like:

  • tabs

  • trailing spaces

  • non-breaking spaces

Useful when:

  • debugging indentation issues

  • cleaning up whitespace

  • spotting trailing blanks

vim.opt.listchars = {
  tab = "» ",
  trail = "·",
  nbsp = "␣",
}

Customizes how invisible characters are shown when list is enabled.

This is a classic “make the editor feel like mine” option.

vim.opt.clipboard = "unnamedplus"

Integrates Neovim with the system clipboard.

A very common setup is:

vim.opt.clipboard = "unnamedplus"

That makes normal yank/delete/put operations use the + clipboard register as the unnamed register.

For many users, this is one of the first options they set.

vim.o.mouse = "a"

Enables mouse support in all major modes.

This allows things like:

  • Clicking to move the cursor

  • selecting text with the mouse

  • resizing splits

Some users love this, some disable it completely. It is largely a preference.

vim.bo.undofile = true

Persists undo history to disk.

That means you can:

  • close a file

  • reopen it later

  • still undo older changes

This is one of the most valuable options for long-term editing comfort.

vim.o.updatetime = 250

Controls how long Neovim waits during inactivity before certain events fire, including CursorHold.

The docs also note it affects when the swap file is written.

Why do people often lower it from the default?

  • snappier CursorHold behavior

  • faster diagnostic popups or plugins relying on idle timing

Common values:

  • 250

  • 300

  • 500

vim.o.termguicolors = true

Enables 24-bit RGB color in the terminal UI.

On modern terminals, this is usually desirable, and Neovim will also try to detect support automatically.

If you use a modern color scheme, this option is very often part of the setup.

vim.opt.completeopt = { "menu", "menuone", "noselect" }

Controls how Insert-mode completion behaves.

A commonly used setup is:

vim.opt.completeopt = { "menu", "menuone", "noselect" }

Why people like it:

  • show the completion menu

  • keep behavior predictable

  • Do not force-select the first item immediately

If you use Neovim’s native completion or a completion plugin, this option matters a lot.

vim.o.wildmenu = true

Enhances command-line completion, especially when pressing <Tab> in command-line mode.

This makes command-line completion much friendlier and is a very common option.

vim.o.wildmode = "longest:full,full"

Controls how command-line completion behaves across repeated <Tab> presses.

A common choice:

vim.o.wildmode = "longest:full,full"

This makes command-line completion feel much smoother.

vim.o.showcmd = true

Shows partial commands as you type them.

This is especially helpful when learning motions and operators because Neovim shows part of what you are building.

vim.o.showmode = false

Shows the current mode in the command area.

Many people disable this when their statusline already shows the current mode.

If you use the default UI, leaving it on is perfectly reasonable.

If you want a compact, practical set of commonly used options, this is a good starting point:

-- Line numbers
vim.wo.number = true
vim.wo.relativenumber = true
-- Indentation
vim.bo.expandtab = true
vim.bo.shiftwidth = 2
vim.bo.tabstop = 2
vim.bo.softtabstop = 2
vim.bo.autoindent = true
-- Search
vim.o.ignorecase = true
vim.o.smartcase = true
vim.o.hlsearch = true
vim.o.incsearch = true
-- UI / movement
vim.wo.cursorline = true
vim.wo.scrolloff = 8
vim.wo.signcolumn = "yes"
-- Splits
vim.o.splitbelow = true
vim.o.splitright = true
-- Files / system
vim.bo.undofile = true
vim.o.updatetime = 250
vim.opt.clipboard = "unnamedplus"
vim.o.termguicolors = true
-- Command line / completion
vim.opt.completeopt = { "menu", "menuone", "noselect" }
vim.o.wildmenu = true
vim.o.wildmode = "longest:full,full"

In a real config, many buffer- and window-local options are often set with vim.opt or through filetype-specific config instead of being forced globally everywhere. But as a learning block, this is a useful start.

The best way to learn Neovim options is not to memorize a giant list. Instead, think in categories:

  • How do I want code to indent?

  • How do I want search to feel?

  • How much context do I want around the cursor?

  • How should splits behave?

  • Do I want system clipboard integration?

  • Do I want persistent undo?

  • How visible should whitespace and diagnostics be?

That is how most good configs evolve.

You do not need to set fifty options at once. Start with the ones that change your daily experience the most:

  • line numbers

  • indentation

  • search

  • scrolloff

  • split behavior

  • clipboard

  • undofile

Then refine from there.

Neovim options are one of the highest-leverage parts of the editor.

Plugins add features. Options shape behavior.

If you understand the common options, you can make Neovim feel cleaner, faster, calmer, and much more intentional without adding a single plugin.

And once you get comfortable with them, reading someone else’s config becomes much easier, too.

After the basics above, the next good options to learn are:

  • formatoptions

  • textwidth

  • colorcolumn

  • conceallevel

  • foldmethod

  • foldexpr

  • spell

  • spelllang

  • sessionoptions

  • shortmess

  • timeoutlen

  • cmdheight

  • laststatus

  • showtabline

Those are where configs start becoming more personal.

Read the original on dotfiles.substack.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.