My Neovim Setup

I finally gave Vim (Neovim) a try after a co-worker insisted that using Vim as a code editor was the “only way”. I already knew basic navigation commands from rebasing and squashing with git, so that part wasn’t so bad. What was overwhelming was the amount of setup required to get basic functionality working, things that come by default in most editors.

My goal was to get Vim working similarly to what I had in Vscode. The basic things I needed were:

  1. A color scheme with syntax highlights
  2. File search, find, and replace
  3. Quick tab switching
  4. Linting on save

To start, I used my co-worker’s config as a base and learned about each plugin listed, line by line, while using Vim itself to edit the config.

After about 2 months or so, I finally got comfortable using Vim and found additional plugins for my setup. There’s a plugin for just about anything! I usually hop around editors depending on what I work on (Vscode, Sublime, RubyMine), and now Vim is on that list too. For front-end heavy work when I’m looking at designs on the side, I probably won’t use Vim. But for back-end work, I’ll use Vim fullscreen.

I definitely recommend giving Vim a try. This is the path I would take if you’re interested:

  1. Learn basic navigation
  2. Find a sample config
  3. Comment out every plugin in the config
  4. Uncomment and install one plugin at a time and learn its functionality
  5. Find plugins you need. Think “what can Vscode do that I would want to do in Vim”?

Here’s a list of plugins in my config. Find the full config here.

call plug#begin('~/.config/nvim/plugged')
  " New Plugins here...

  " Search
  Plug 'nvim-lua/plenary.nvim' " co-dependent to telescope
  Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.4' }
  Plug 'dyng/ctrlsf.vim' " search/replace like sublime text
  Plug 'jlanzarotta/bufexplorer' " allows quicky deletion of buffers
  Plug 'ctrlpvim/ctrlp.vim' " file finder, multi select open

  " Efficiency
  Plug 'andrewRadev/tagalong.vim' " Change an HTML(ish) opening tag and take the closing one along as well
  Plug 'tpope/vim-surround' " delete/change/add parentheses/quotes/XML-tags/much more with ease
  Plug 'tomtom/tcomment_vim' " An extensible & universal comment vim-plugin
  Plug 'tpope/vim-endwise' "helps to end certain structures automatically. In Ruby, this means adding end after if, do, def and several other keywords.
  Plug 'chaoren/vim-wordmotion' " More useful word motions for Vim
  Plug 'Raimondi/delimitMate' " provides insert mode auto-completion for quotes, parens, brackets, etc.
  Plug 'rhysd/clever-f.vim' " Extended f, F, t and T key mappings for Vim.
  Plug 'tpope/vim-repeat' " repeat.vim: enable repeating supported plugin maps with .
  Plug 'andrewradev/undoquit.vim' " reopen the last window you closed
  " Plug 'ervandew/supertab' " Perform all your vim insert mode completions with Tab
  Plug 'mg979/vim-visual-multi' " Multiple cursors plugin for vim/neovim, for vertical section enter v-block then shift+i insert mode
  Plug 'tyru/open-browser.vim'
  Plug 'tyru/open-browser-github.vim' " Open Github from code
  Plug 'airblade/vim-gitgutter' " Diff changes on the side

  " Misc
  Plug 'tpope/vim-fugitive' " Git wrapper
  Plug 'vim-airline/vim-airline' " Status bar
  Plug 'vim-airline/vim-airline-themes' " Status bar themes
  Plug 'voldikss/vim-floaterm' " floating terminal
  Plug 'preservim/nerdtree' " Tree navigation

  " Languages
  Plug 'vim-test/vim-test'
  Plug 'dense-analysis/ale'
  Plug 'jlcrochet/vim-ruby'
  Plug 'pangloss/vim-javascript'
  Plug 'tpope/vim-rails'
  Plug 'maxmellon/vim-jsx-pretty'
  Plug 'neoclide/coc.nvim', {'branch': 'release'}

  " Make it pretty
  Plug 'rktjmp/lush.nvim' " required for darcula-solid
  Plug 'briones-gabriel/darcula-solid.nvim'
  Plug 'rockyzhang24/arctic.nvim'
  Plug 'vwxyutarooo/nerdtree-devicons-syntax'
  Plug 'ryanoasis/vim-devicons' " Ensure it's the last plugin and install Nerd Font
call plug#end()