How to install Neovim
Neovim is a modern, extensible text editor based on Vim. This guide shows how to install it on Windows and Linux.
Installation by Operating System
Installing on Windows via PowerShell
-
Open PowerShell as Administrator
Press
Windows + XWindowsXWindows + XWindowsXWindows + XWindowsX and select “Windows PowerShell (Admin)” or “Terminal (Admin)” -
Check that winget is installed
Checking winget winget --versionIf it is not installed, get it from the Microsoft Store or update Windows.
-
Install Neovim using winget
Installing Neovim winget install Neovim.Neovim -
Verify the installation
Checking the Neovim version nvim --version -
Add Neovim to the PATH (if needed)
winget usually does this automatically, but if the
nvimcommand does not work, add the path to your environment variables:- Typical path:
C:\Users\YourUser\AppData\Local\nvim-data\nvim-win64\bin
- Typical path:
Installing on Linux
-
For Ubuntu/Debian
Updating repositories sudo apt updateInstalling Neovim sudo apt install neovim -
For Fedora/RHEL
Installing Neovim on Fedora sudo dnf install neovim -
For Arch Linux
Installing Neovim on Arch sudo pacman -S neovim -
Verify the installation
Checking the Neovim version nvim --version
Initial Setup
After installing, it is recommended to create the configuration directory:
mkdir $env:LOCALAPPDATA\nvimmkdir -p ~/.config/nvimBasic Commands to Get Started
Here are the essential commands to start using Neovim:
Opening Neovim
nvimnvimOpening a specific file
nvim file.txtnvim file.txtEssential Keyboard Shortcuts
Navigation
hhhhhh - Move leftjjjjjj - Move downkkkkkk - Move upllllll - Move right000000 - Go to the start of the lineDollar Sign$Dollar Sign$Dollar Sign$ - Go to the end of the lineGGGGGG - Go to the end of the filegstarlightKbd.kbd.keywords.thengg ggstarlightKbd.kbd.keywords.thengg ggstarlightKbd.kbd.keywords.thengg g - Go to the start of the file
Modes
iiiiii - Enter insert mode (before the cursor)aaaaaa - Enter insert mode (after the cursor)EscapeEscEscapeEscEscapeEsc - Leave insert mode and return to normal modeColon:Colon:Colon: - Enter command mode
Editing
xxxxxx - Delete the character under the cursordstarlightKbd.kbd.keywords.thendd ddstarlightKbd.kbd.keywords.thendd ddstarlightKbd.kbd.keywords.thendd d - Delete the entire lineystarlightKbd.kbd.keywords.thenyy yystarlightKbd.kbd.keywords.thenyy yystarlightKbd.kbd.keywords.thenyy y - Copy (yank) the entire linepppppp - Paste after the cursoruuuuuu - Undo the last actionControl + rControlrControl + rControlrControl + rControlr - Redo an undone action
Saving and Quitting
Colon:Colon:Colon: wwwwww EnterEnterEnterEnterEnterEnter - Save fileColon:Colon:Colon: qqqqqq EnterEnterEnterEnterEnterEnter - Quit without savingColon:Colon:Colon: wstarlightKbd.kbd.keywords.thenqw qwstarlightKbd.kbd.keywords.thenqw qwstarlightKbd.kbd.keywords.thenqw q EnterEnterEnterEnterEnterEnter - Save and quitColon:Colon:Colon: qstarlightKbd.kbd.keywords.thenExclamation Markq !qstarlightKbd.kbd.keywords.thenExclamation Markq !qstarlightKbd.kbd.keywords.thenExclamation Markq ! EnterEnterEnterEnterEnterEnter - Force quit without saving
Search
Slash/Slash/Slash/ texttexttexttexttexttext EnterEnterEnterEnterEnterEnter - Search for textnnnnnn - Next occurrenceNNNNNN - Previous occurrence
Windows
Control + wControlwControl + wControlwControl + wControlw vvvvvv - Split verticallyControl + wControlwControl + wControlwControl + wControlw ssssss - Split horizontallyControl + wControlwControl + wControlwControl + wControlw hhhhhh - Move to the left windowControl + wControlwControl + wControlwControl + wControlw jjjjjj - Move to the window belowControl + wControlwControl + wControlwControl + wControlw kkkkkk - Move to the window aboveControl + wControlwControl + wControlwControl + wControlw llllll - Move to the right windowControl + wControlwControl + wControlwControl + wControlw qqqqqq - Close the current window
Next Steps
To set up Neovim with plugins and themes, see the official documentation at neovim.io.