Skip to main content

Installation and First Launch

This lesson covers installing Neovim, verifying the version, and completing your first editing session with the essential survival commands.

Learning Focus

Leave this lesson with Neovim installed, version 0.9+ confirmed, and enough survival skills to open, edit, save, and quit a file.

Installation​

# From system packages (may be older version)
sudo apt update
sudo apt install -y neovim
nvim --version

# For latest stable — use AppImage
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/nvim
nvim --version
Version Requirement

This track requires Neovim 0.9+. Many features (LSP, Treesitter, lazy.nvim) require 0.9 or newer. Run nvim --version to confirm.

Verify Installation​

nvim --version

Expected:

NVIM v0.10.4
Build type: Release
LuaJIT 2.1.0-beta3
...

Configuration Directory​

Neovim loads config from:

# Primary config directory
~/.config/nvim/

# Main config file
~/.config/nvim/init.lua (Lua — preferred)
# or
~/.config/nvim/init.vim (Vimscript — legacy)
# Create the config directory
mkdir -p ~/.config/nvim

# Confirm nvim knows where to look
nvim --headless -c "echo stdpath('config')" -c "quit"

Survival Commands — Your First Session​

Open a file:

nvim myfile.txt
You are now in Normal mode. Do NOT type yet.

The Four Commands You Must Know​

What to doKeys
Enter Insert mode (start typing)i
Return to Normal modeEsc
Save the file:w then Enter
Quit:q then Enter
Save and quit:wq then Enter
Quit without saving (force):q! then Enter

Step-by-Step First Session​

1. Open a file: nvim test.txt
2. Look at bottom left: -- NORMAL --
3. Press i: -- INSERT -- (now you can type)
4. Type: Hello Neovim
5. Press Esc: -- NORMAL --
6. Type: :w (command line appears at bottom)
7. Press Enter: File saved
8. Type: :q
9. Press Enter: Neovim exits

Getting Help Inside Neovim​

Neovim has an excellent built-in help system:

:help → Open general help
:help i → Help for Insert mode
:help motion → Help for motions
:help :write → Help for the :write command
:help 'number' → Help for the number option

Navigate help with:

Ctrl+] → Follow help tag (link)
Ctrl+o → Go back
:q → Close help window

Checking Health​

Neovim includes a health-check tool:

nvim --headless -c "checkhealth" -c "quit"
# or inside nvim:
:checkhealth

This shows which dependencies are installed/missing and what providers are available.

The nvim Alias​

Most experienced users alias nvim to vim for convenience:

~/.bashrc or ~/.zshrc
alias vim="nvim"
alias vi="nvim"

Common First-Launch Pitfalls​

PitfallSymptomFix
Typing in Normal modeWeird characters or commandsPress Esc → :q! → start again
Can't save"E212: Can't open file"Check directory permissions
Old version (< 0.9)Plugins fail to loadInstall via AppImage (see above)
"NVIM" vs "nvim"Wrong binaryRun which nvim to verify

Immediate Next Step​

Run the built-in tutorial:

:Tutor

This is Neovim's interactive tutorial that takes ~30 minutes and teaches all survival commands. Do this before anything else.

In LazyVim​

LazyVim Context

Installing LazyVim requires first installing Neovim 0.9+ (exactly as described above) and ensuring you have dependencies like Git, a C compiler, and optionally a Nerd Font. Once Neovim is installed, installing LazyVim is as simple as cloning their starter template into your ~/.config/nvim directory.

AspectVanilla NeovimLazyVim
PrerequisitesNeovim binaryNeovim binary, Git, C compiler, Nerd Font, Ripgrep
Configuration setupmkdir ~/.config/nvim & touch init.luagit clone https://github.com/LazyVim/starter ~/.config/nvim
First runEmpty editorDownloads dozens of plugins automatically
Health checks:checkhealth:LazyHealth and :checkhealth

What's Next​