Using Neovim as a daily driver — the power of a terminal-based text editor is beyond imagination
First a question: Why do we need a terminal-based text editor when we have the whole power of VS Code and all its fancy formatting and modules?
The answer is simple.
- VS Code uses Electron as its core, which means the amount of RAM it takes is huge.
- Because Neovim is a terminal-based text editor, it enables you to code in any Linux, even without having a display manager or things like cloud or virtual machines or a Docker container, where all you get is just a terminal.
- As it is terminal-based, all you need is a keyboard to do all the complex operations, which means once the shortcuts become habitual, you never have to lift a finger off your keyboard to use the mouse for any reason.
With this article, I will try to give a workflow in which I use Nvim as my daily driver and all the configurations that one can use to make life easier with Neovim.
First things first. Let’s start with installation.
Taking it from the official Neovim installation guide, here I will mention just a few popular distros.
Since 18.04 via the official repository, as in Debian, Neovim is in Ubuntu.
sudo apt install neovim
:python) support seems to be automatically installed.
sudo apt install python-neovim
sudo apt install python3-neovim
macOS / OS X
The releases page provides pre-built binaries for macOS 10.11+.
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos.tar.gz
tar xzf nvim-macos.tar.gz
Homebrew on macOS or Linux
brew install neovim
Or install the development version of Nvim:
brew install --HEAD luajit
brew install --HEAD neovim
- Release (v0.4):
choco install neovim(use
-yfor automatically skipping confirmation messages)
- Development (pre-release):
choco install neovim --pre
scoop install neovim
- Development (pre-release):
scoop bucket add versions
scoop install neovim-nightly
After we are done setting up Vim, let’s just get some basics clear, like how to get started with Vim and do some basic things.
- h moves the cursor one character to the left.
- j moves the cursor down one line.
- k moves the cursor up one line.
- l moves the cursor one character to the right.
- 0 moves the cursor to the beginning of the line.
- $ moves the cursor to the end of the line.
- w moves forward one word.
- b moves backward one word.
- G moves to the end of the file.
- gg moves to the beginning of the file.
- `. moves to the last edit.
Again, here’s a longer list of the commands you’ll definitely want to know starting out:
- d starts the delete operation.
- dw will delete a word.
- d0 will delete to the beginning of a line.
- d$ will delete to the end of a line.
- dgg will delete to the beginning of the file.
- dG will delete to the end of the file.
- u will undo the last operation.
- Ctrl-r will redo the last undo.
Here are the commands you most need to start out:
- v highlights one character at a time.
- V highlights one line at a time.
- Ctrl-v highlights by columns.
- p pastes text after the current line.
- P pastes text on the current line.
- y yanks text into the copy buffer.
So don’t mug them up — once you start using them, this will be your muscle memory.
This is how my Neovim looks right now.
It has a search bar, or file explorer, just like VS Code.
Neovim also allows you to split your text editor.
Now I will share my Neovim config. Copy it to your Neovim config folder, generally at
The NERD tree allows you to have that dope side file explorer and codefmt autoformats code.
Apart from that, there are some custom shortcut mappings to key combinations. For example, ctrl+b opens a NERD Tree window.
How To Do the Switch
Believe me, the day I did the switch from VS Code to Nvim, it was tough. Even closing the Nvim window becomes a challenge. But once you start using it for a while, it becomes tough to code or write at any place apart from the Vim environment. I don’t even know how many times I have typed :w here while typing on Medium :).
My take would be this: Don’t be too hard on yourself, but make it a habit that any small code change will be done using Vim. If a whole project is to be developed, only then switch to something like Sublime or VS Code.
Thanks for reading, do ping me in the comments if you need any help.
If You find it interesting!! we would really like to hear from you.
Ping us at Instagramfirstname.lastname@example.org
IF YOU WANT ARTICLES ON ANY TOPICS DM US ON INSTA.
Thanks for reading!!