How to Use Neovim: The Beginner's Guide (First File, Modes, init.lua, and the Plugin Habit That Stays Small)

CodexFuse Team · 2026-10-30T12:40:24.145Z · 11 min read

How to Use Neovim: The Beginner's Guide

Learning how to use Neovim takes about an hour of honest practice — and the install is the easy part. Neovim is a hyperextensible Vim-based text editor that runs in your terminal, and it rewards the people who learn it in the right order: install, the built-in tutorial, modes, then config. Most beginners quit because they do it backwards — they paste a 2,000-line config they found online, nothing makes sense, and they're back in their old editor by Friday.

This guide takes the other road. You will install Neovim, survive the built-in :Tutor, understand modal editing, write your first small init.lua, and add just enough plugins and LSP to feel the power — without drowning. If you currently live in a graphical editor, start with our VS Code beginner guide for the GUI side of the story; this guide is the terminal-editor lane, and the two complement each other instead of competing.

How Do You Use Neovim? The First Five Minutes

If you just want the answer and nothing else, here is the whole beginner loop. Everything below unpacks each step.

  1. Install Neovim with your package manager or the official build from neovim.io (current stable is 0.12).
  2. Open it by typing nvim in your terminal. For a file: nvim notes.txt.
  3. Type :Tutor and press Enter. This built-in interactive tutorial teaches you the basics in about 30 minutes — do not skip it.
  4. Learn two moves first: press i to type (Insert mode), press Esc to stop typing (Normal mode). That is 90% of surviving day one.
  5. Save and quit with :wq. Quit without saving with :q!. Congratulations — you know how to exit Vim, the thing the internet jokes about.

What Is Neovim, Really?

Neovim is a hyperextensible Vim-based text editor, per its own homepage at neovim.io. It is fully compatible with Vim's editing model and Vimscript v1, but it modernizes the package: Lua replaces Vimscript for configuration ("your config lives in init.lua"), language-server support (LSP) is built in for go-to-definition, hover docs and diagnostics, and Tree-sitter parsing powers accurate syntax highlighting. The project states its vision plainly: with 30% less source code than Vim, it aims to enable new applications without compromising Vim's traditional roles.

The current stable release is 0.12 (neovim.io FAQ, checked 2026-10-30). Version 0.12 matters for beginners because it added a native plugin manager called vim.pack and an interactive :lsp command — two things that used to require plugins. If a tutorial you find online still starts with installing a third-party plugin manager, it is from an older era; the modern path is simpler.

How Do You Install Neovim?

The install takes two minutes. The trap is installing an old Neovim: many popular plugins now require 0.10 or newer, and some Linux distributions ship ancient versions. The FOSS Linux guide (updated about five weeks ago, fetched 2026-10-30) documents this clearly — on Ubuntu 24.04 the default repository ships Neovim 0.9.5, which the guide calls too old for modern plugins. So pick a method that gives you the current release:

PlatformRecommended methodWhy
macOSbrew install neovimHomebrew tracks current releases; the simplest path on a Mac
Ubuntu / DebianThe neovim-ppa/unstable PPA, the Snap (sudo snap install nvim --classic), or the official tarball from GitHub releasesThe default repo lags badly (0.9.5 on Ubuntu 24.04); all three of these give you current 0.12.x
Any LinuxDownload the official build from the Neovim GitHub releases page (the "Install Now" link on neovim.io points you there)Same version as upstream, no package-manager lag
WindowsThe official Windows build from the same GitHub releases pageSame story — take the current release, not whatever a mirror offers

After installing, verify with nvim --version — you want to see 0.12.x or newer. Then, inside Neovim, run :checkhealth: it is a built-in diagnostic that checks your terminal capabilities and external tools like ripgrep and git, and it catches configuration problems before they become frustrating (FOSS Linux).

What Are Neovim's Modes? (Learn This Before Any Config)

Here is the one idea that decides whether Neovim clicks for you. Neovim is a modal editor: it has different modes for different jobs, and you switch between them with specific keys. In VS Code you are always "typing"; in Neovim you are usually navigating and commanding, and you drop into typing only when you press a key. This is not a limitation — it is the feature that makes editing faster once the muscle memory lands. The cheat sheet at cheatly.dev puts it well: Neovim is not about memorizing hundreds of shortcuts, it is about learning a small grammar of motions and operators that combine.

The three modes a beginner needs:

ModeWhat it is forHow you get there
Normal modeThe default. Moving around, deleting, copying, running commands. Stay here most of the time.Press Esc from any other mode
Insert modeActually typing text.Press i from Normal mode
Visual modeSelecting text, then running an operation on the selection.Press v from Normal mode

The handful of commands that carry you through the first week (all from the guides fetched this run): h j k l move left/down/up/right in Normal mode; yy copies (yanks) a line; :w saves; :q quits; :wq saves and quits; :q! quits without saving; ZZ saves and quits as a shortcut; :h opens the built-in help on any topic. If typing does nothing when you open Neovim, you are in Normal mode — press i. If you are stuck somewhere, press Esc twice. That confusion on day one is universal, and it passes.

How Do You Run the Built-in Tutorial?

Neovim ships with an interactive tutor, and the official site's own advice to newcomers is blunt: "If not [a Vim user], try :Tutor." Type :Tutor and press Enter. It walks you through cursor movement, entering and exiting Insert mode, deleting, undoing, and saving — with exercises, not lectures. Budget about 30 minutes, and do it in one sitting if you can. Daniel Armstrong's "Getting Started with Neovim" guide recommends spending a full week getting comfortable with the tutorial's core commands and the Normal/Insert mode rhythm before touching any configuration. That advice is gold: a config cannot teach you modes.

How Do You Write Your First init.lua?

Neovim's configuration lives in ~/.config/nvim/init.lua — a single Lua file. Create the directory and the file, then start with a deliberately small config. This starter is adapted from the one in the FOSS Linux guide (fetched 2026-10-30):

-- ~/.config/nvim/init.lua — a beginner starter
vim.opt.number = true          -- absolute line numbers
vim.opt.relativenumber = true  -- relative offsets (jump "5 lines down" easily)
vim.opt.tabstop = 4            -- a tab is 4 spaces wide
vim.opt.shiftwidth = 4         -- indent by 4 when auto-indenting
vim.opt.expandtab = true       -- use spaces instead of tab characters
vim.opt.smartindent = true     -- sensible auto-indent for code
vim.opt.wrap = false           -- don't wrap long lines
vim.opt.ignorecase = true      -- case-insensitive search...
vim.opt.smartcase = true       -- ...unless you type a capital letter
vim.opt.cursorline = true      -- highlight the current line
vim.opt.termguicolors = true   -- full-color themes in the terminal
vim.opt.undofile = true        -- undo history survives closing the file
vim.g.mapleader = " "          -- Space is your "leader" key for custom shortcuts

Every line uses vim.opt (options) or vim.g (globals) — the modern Lua API. A few notes on the choices: relative line numbers look odd at first, but combined with motions they let you jump exact distances ("delete 5 lines" becomes d5j); undofile is the single most underrated beginner option, because it means closing a file never destroys your undo history; and setting the leader key to Space now avoids rebinding it later, since almost every plugin tutorial assumes a Space leader. When the file grows, split it into modules: create ~/.config/nvim/lua/ and load files with require("module_name") — the guide confirms this is the standard way to stay organized.

Which Plugins Should a Beginner Install?

Here is the plugin habit that keeps beginners from quitting: install three to five plugins, maximum, and know what each one does. The classic failure mode is cloning someone's "ultimate" config with 60 plugins on day two, then spending the weekend debugging keybindings you never chose. Neovim 0.12's native plugin manager vim.pack makes the minimal path even easier — you no longer need a third-party plugin manager to start.

A sane starter set, and nothing more until you feel a specific pain:

Plugin jobWhat to reach forWhy a beginner wants it
ColorschemeAny built-in scheme first (:colorscheme + Tab lists them)Neovim ships several; pick one and move on — theming is a rabbit hole
Syntax highlightingTree-sitter (built into Neovim's core)Accurate highlighting and text objects without a plugin at all
File findingA fuzzy finder like TelescopeJump to any file in a project in two keystrokes
Code intelligenceBuilt-in LSP (next section)Go-to-definition and hover docs with zero plugins

Notice how much of the modern Neovim experience is already built in. That is the point of the stay-small rule: add a plugin only when you can name the exact job it does for you. Community distributions like LazyVim and NvChad exist and are excellent, but they are someone else's finished house — build your own small one first, so you understand every room.

How Do You Add LSP (Code Intelligence)?

LSP — the Language Server Protocol — is what gives editors go-to-definition, hover documentation, and inline error diagnostics. Neovim has had built-in LSP since 0.5, and recent releases made setup genuinely simple. The FOSS Linux guide's advice is the right shape: start with one language you use daily, get it working, then expand. The biggest beginner mistake is configuring LSP for six languages at once.

Setup needs two things: the language-server binary on your system, and one line in your config. For Python, for example: install the server (npm install -g pyright), then add vim.lsp.enable('pyright') to your init.lua. Neovim 0.12 also added the interactive :lsp command, which lists running servers and lets you stop or restart one that misbehaves — a big improvement over the old Lua-only management.

The default navigation bindings give you the essentials: gd jumps to the definition under your cursor, K shows hover documentation, <leader>rn renames a symbol everywhere, and <leader>ca triggers code actions like auto-imports. They feel alien for a day and obvious by the end of the week.

Neovim vs Vim: What's the Difference?

Neovim is not a rewrite that abandoned Vim — it is fully compatible with Vim's editing model and Vimscript v1, so every Vim motion and most Vim plugins work unchanged. The differences are modernization, not revolution:

AreaVimNeovim
Configuration languageVimscriptLua first (Vimscript still supported)
Code intelligenceVia pluginsLSP built in
Syntax engineRegex-basedTree-sitter parsing for accurate highlighting and text objects
Plugin managerThird-party onlyNative vim.pack since 0.12
TerminalLimited built-in terminalBuilt-in :terminal that set the standard for TTY-as-a-component
CodebaseThe original30% less source code, per the project's own FAQ

If you already use Vim, the official site suggests starting with :help nvim-from-vim to see exactly what changes. If you are new to both, none of this history matters — learn Neovim as Neovim.

How Does Neovim Fit With tmux and a Modern Terminal?

Neovim lives in the terminal, so the terminal around it matters. Two companions complete the setup: tmux gives you persistent sessions and split panes, so your editor survives a dropped SSH connection and sits next to a test runner; and a modern terminal app gives you the fonts, tabs and GPU rendering that make the whole thing feel fast. Our tmux beginner guide covers the session layer Neovim runs inside, and our Warp beginner guide covers the terminal app branch. The classic stack — terminal, tmux, Neovim — is the reason so many developers never leave the keyboard.

Sources

  • Neovim official site — neovim.io: stable release 0.12, config lives in init.lua, :Tutor for beginners, full Vim editing-model and Vimscript v1 compatibility, built-in LSP and Tree-sitter, 30% less source code than Vim. Fetched 2026-10-30.
  • FOSS Linux, "How to Install and Use Neovim on Ubuntu" — fosslinux.com: four install methods (PPA, tarball, Snap, repo), Ubuntu 24.04 repo ships 0.9.5 (too old for modern plugins), init.lua starter config, vim.lsp.enable('pyright') setup, gd/K/<leader>rn/<leader>ca bindings, native vim.pack in 0.12, :lsp command, :checkhealth diagnostic. Fetched 2026-10-30.
  • Neovim Cheatsheet — nvim.cheatly.dev: modal grammar (motions + operators compose), mode-switching keys, :w/:q/:wq commands. Search-result evidence, 2026-10-30.
  • Max Libin, "learn nvim workshop" — maxlibin.com: modes overview, hjkl navigation, yy yank, :h help system. Search-result evidence, 2026-10-30.
  • Chris Titus, "Neovim: The Ultimate Editor" — christitus.com: beginner framing, ZZ quit shortcut, leader-key mapping, kickstart.nvim config path. Search-result evidence, 2026-10-30.

Frequently asked questions

Is Neovim hard to learn if I come from VS Code?

The first week is genuinely slower — even the cheat-sheet authors admit you will probably quit back to VS Code at least once, and that is normal. The difficulty is not the editor, it is unlearning mouse-first habits. Do :Tutor, then use Neovim for real small files (notes, configs) for two weeks before judging it. Most people who survive that window never go back, because modal editing starts to feel immediate instead of menu-driven.

What is the difference between Neovim and Vim?

Neovim keeps Vim's entire editing model and Vimscript v1 compatibility, then adds Lua configuration, built-in LSP, Tree-sitter parsing, a built-in terminal, and (since 0.12) a native plugin manager — with 30% less source code. If you know Vim, Neovim feels like home with better plumbing; if you know neither, learn Neovim directly and skip the history lesson.

Where is the Neovim config file?

At ~/.config/nvim/init.lua on Linux and macOS. Neovim 0.12-era configuration is Lua, not Vimscript. Start with the small starter config in this guide — options via vim.opt, your leader key via vim.g.mapleader — and split the file into lua/ modules only when it outgrows one page.

How do I save and exit Neovim?

Type :w to save, :q to quit, :wq to save and quit, :q! to quit without saving, or ZZ as the quick save-and-quit shortcut. All of these are typed in Normal mode (press Esc first if you are typing).

Do I need plugins to start using Neovim?

No. A current Neovim (0.12+) with a ten-line init.lua is a complete, fast editor — the native vim.pack manager, built-in LSP and Tree-sitter cover what used to need plugins. Add a fuzzy finder and a colorscheme when you feel the specific need, and keep the total small: every plugin you cannot explain is a future debugging session.

Featured on Twelve Tools Launch Llama Tools Launch your MCP