Neovim is a powerful command-line text editor that is used to create and edit text files, source code, and configuration files. It is an improved version of Vim with better performance and modern features. You can install and use Neovim in Termux to edit files using simple terminal commands.
Here’s what you can do with Neovim in Termux:
- Create and edit text files.
- Write source code.
- Edit Linux configuration files.
- Open multiple files and tabs.
- View files in read-only mode.
- Learn a modern terminal text editor.
Install Neovim in Termux
Below are the simple commands to install Neovim in Termux. Copy and run each command one by one to install the editor.
Update Termux packages.
pkg update && pkg upgrade -yInstall Neovim.
pkg install neovim -yCheck the installed version.
nvim --versionNeovim is now installed and ready to use.
Use Neovim in Termux
After installing Neovim in Termux, you can use different commands to create files, edit documents, open multiple files, and perform other text editing tasks. Below are some commonly used Neovim commands for beginners.
Create or open a file.
nvim file.txtShow the Neovim help menu.
nvim --helpDisplay the installed version.
nvim --versionOpen a file in read-only mode.
nvim -R file.txtOpen two files in horizontal windows.
nvim -o file1.txt file2.txtOpen two files in vertical windows.
nvim -O file1.txt file2.txtOpen files in separate tabs.
nvim -p file1.txt file2.txtExecute a command after opening a file.
nvim +"set number" file.txtStart Neovim without loading user configuration.
nvim --cleanOpen a custom configuration file.
nvim -u ~/.config/nvim/init.luaOpen a saved session.
nvim -S Session.vimStart Neovim in diff mode.
nvim -d file1.txt file2.txtThese are some of the most useful Neovim commands for beginners. You can use them to open files, manage windows, edit text, and perform different editing tasks in Termux.
Essential Neovim Keyboard Shortcuts
- i : Enters insert mode.
- Esc : Returns to normal mode.
- :w : Saves the current file.
- :q : Quits Neovim.
- :wq : Saves the file and exits.
- :q! : Exits without saving changes.
- dd : Deletes the current line.
- yy : Copies the current line.
- p : Pastes the copied or deleted line.
- u : Undoes the last change.
- Ctrl + r : Redoes the last undone change.
- /text : Searches for text in the current file.
- :set number : Displays line numbers.
End Note
Neovim is one of the most popular terminal text editors used by developers and Linux users. After installing it in Termux, you can easily manage files, write code, and edit text using simple commands.

