Did I Improve ThisBlogAbout

NeoVim - text editor

06 July, 2020 - 2 min

Neovim is my terminal text editor of choice. Sometimes replacing my IDE. The vim workflow has proven to be very productive to me. If you don't know vim, (neovim is "just" a refactored/improved vim), it is a text editor which puts an enormous focus on text editing efficiency.

Vim has a set of modes. Let's just focus on the three main modes, normal, visual and insert. The default - normal mode - allows you to navigate and quickly edit text with a couple of key presses. The visual mode allows you to select text. The insert allows you to insert text like in a normal text editor.

Just to give an idea on how it works, let me give you a few examples:

  • Jump one word using w or jump ten words with 10w.
  • Delete ten words with d10w.
  • Toggle the case of one letter with ~ or of a word with viw~ (v enters select mode, combining with iw it will select the word under the cursor. Then ~ will apply the uppercase to the selection).
  • Replace something between () with ci(. In practice what happens is it deletes everything inside the () and enters insert mode allowing you to type what you want.

Vim workflow example Fig. 1 - Vim workflow example.

You can personalize/improve pretty much anything in vim. I use the Ultimate Vim configuration from amix. I found it suits my needs. So far I use the following features:

  • NerdTree - a file system explorer side pane
  • open_file_under_cursor.vim - allows to open a file under cursor
  • vim-zenroom2 - creates a distraction-free vim environment so you can focus
  • vim-markdown - support for markdown
  • vim-python-pep8-indent - python ident
  • ale - checks syntax for a lot of languages
  • Color schema - I use the Ultimate Vim configuration color schema


Thanks for reading!

Vicente




A list of articles in the series Terminal Workflow:

  1. Terminal Base Setup
  2. Tmux - terminal multiplexer

3. NeoVim - text editor

  1. Jrnl - note app
  2. Pass - password manager
  3. Ranger - file manager
  4. Simple Terminal Apps
  5. Terminal Aliases