Code like a Hacker: Another Neovim Terminal Setup

Getting started with iterm2, Oh My Zsh, tmux, and Neovim

Photo by Ilya Pavlov on Unsplash


I am using macOs. Te tools and configurations that I will be sharing is my own preference and personal opinion.

There will be several tools and packages that I will be going over. Some of which are:

  • Homebrew
  • iterm2
  • Oh My Zsh
  • tmux
  • neovim

The following are concise steps and configurations I took from going over multiple terminal configuration articles and personal taste from previous experience living in the terminal.

The below instructions assumes that you currently don’t have these tools installed.

Let’s get started…

The first thing I did is to adjust the “Key Repeat” and “Delay Until Repeat” values in Preferences > Keyboard

I find this to be helpful when holding down the “Backspace” key to delete characters.


Install brew.

/bin/bash -c "$(curl -fsSL"

You might be asked to install/update xcode while installing brew. Run the below to install xcode if you don’t have it installed.

xcode-select --install

After installing brew, your system should be able to point and use the tools installed through brew.

Add the below to your HOME path.

export PATH="/usr/local/bin:$PATH"

Source your ~/.zshrc file.

source ~/.zshrc

Verify if Homebrew was successfully installed.

brew -v

You can update applications installed by brew when new versions are released by running the below. Make sure brew itself is up to date before updating the installed packages.

brew update

Upgrade installed packages.

brew upgrade


brew install --cask iterm2

Download and install the iterm2-snazzy theme to add colors to your iterm2 in the link below.

Go to Preferences > Profiles. In the Color Presets dropdown, select Snazzy

Oh My Zsh

Before installing Oh My Zsh, make sure you have zsh installed.

zsh --version

Install zsh.

brew install zsh

Set zsh as your default shell.

chsh -s /usr/local/bin/zsh

Install Oh My Zsh.

sh -c "$(curl -fsSL”


vim ~/.zshrc


autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line.


The plugin adds several aliases for common brew commands.


The git plugin provides many aliases and a few useful functions.


It suggests commands as you type based on history and completions.


This plugin provides syntax highlighting for zsh while typing. I find this plugin helpful for pointing out typos as well as when reviewing the syntax before running them.

You can update your Oh My Zsh plugins when new versions are released by running the below.

omz update


autojump is a really nice way to navigate your file system by only typing a partial name of the directory you want to navigate to since it retains a list of most visited directories. Although, there are instances where you have directory that are similarly named. This is where I find setting up aliases to be useful.

Create a private oh-my-zsh file. You can put your personal configurations in this file so as not to clutter the default

vim ~/.oh-my-zsh/
Noticed that I used “nvim” instead of “vim”. We will go over installing neovim below as well.

Above is a sample aliases I have. You can add more aliases in this file. is not currently being loaded by oh-my-zsh. Add this file as a configuration to be loaded by default when opening your terminal

vim ~/.zshrc

Add the below code under where you list out your plugins.

source $ZSH/

Source .zshrc.

source ~/.zshrc


I have used and explored multiple zsh, iterm, and vim themes before. At this point, I’ve come to love powerlevel10k a lot. It doesn’t only add color and style to zsh, it also adds the same theme to vim while emphasizing on speed and flexibility.

Install powerlevel10k

brew install romkatv/powerlevel10k/powerlevel10

Run the snippet below to add sourcing of the powerlevel10k theme to your zshrc file when you open iterm2.

echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc

Install the recommended font before configuring your theme to see all prompt styles. Running the configure syntax should prompt you if you want to install the font but incase it doesn’t do that, download 4 fonts listed here. Double click on each one and click install to install the font.

Configure your powerlevel10k theme using the configuration wizard by running the below.

p10k configure

Make sure you are using the right font in your terminal by checking if you have selected “MesloLGS Nerd Font Mono” like in the image below.

Other configuration


Install tmux.

brew install tmux

tmux out of the box is already great but there are tons of open-source plugins that could make tmux an even greater tool in the terminal. In order to leverage these plugins, we must install a tmux plugin manager.

git clone ~/.tmux/plugins/tpm

Create a ~/.tmux.conf file and put the below code at the very bottom of the file.

# keep this line at the very bottom of tmux.conf
run '~/.tmux/plugins/tpm/tpm'

Before starting to look into what plugins you would want to install, remap the default prefix to <C-a>. The default <C-b> is a bit of a stretch.

Add the below lines of code in tmux.conf file.

# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix



Contains common tmux options that are usually searched for and applied.


tmux powerline theme.


Saves your tmux session and environment. Opening tmux after quitting or a computer restart will restore your session as if you never closed tmux.


Requires tmux-resurrect to work. Continuously saves your tmux environment and sessions. Automatically opens and restores tmux when computer is turned on.

Add the below code in tmux.conf.

set -g @continuum-restore 'on'
set -g @continuum-boot 'on'


Enables regex searches on tmux.


Copies from tmux to the system clipboard. Works great with tmux-copycat — copying text after searching using tmux-copycat.


Another plugin that works great with tmux-copycat. Opens the highlighted text directly from tmux.

Reload tmux environment and source TPM.

tmux source ~/.tmux.conf

Install tmux plugins in tmux.conf

<C-a> I

Update your plugins from time to time when new updates comes out.

<C-a> U

You can view my tmux.conf configuration here.

By this point, your terminal should look like the image below.


brew install neovim

Install vim-plug as a vim plugin manager. There are a handful of plugin managers out there for vim. vim-plug is fast, widely used, and the most popular at this point of time and is basically the reason I use it.

sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \'


Create init.vim file if you haven’t already.

nvim ~/.config/nvim/init.vim

Add the below to init.vim to install sonokai.

Add the below sonokai configuration after the list of plugins.

The configuration above makes you use sonokai’s color scheme by setting termguicolors. This also makes use of the stye andromeda. You can choose other styles by setting a different one from this list.

Add lightline.vim as the status bar.

Add lightline-vim config.


Some of the below plugins would require at least Python 3.6 to properly function. The default python version I have was Python 2. I used miniconda to install Python 3.* without having to tinker with my machine’s default python configuration.

Intall miniconda.

brew install --cask miniconda

Install a new Python 3.6 environment.

conda create --name myenv python=3.*

Activate the new environment.

conda activate myenv


From opening files to finding strings in your working directory, denite does it all. denite works similar to FZF and CtrlP but it’s a plugin made for vim as opposed to a command line tool making it highly customizable for vim.

denite requires pynvim and msgpack to work correctly.

pip install --user pynvim
pip install msgpack

Install denite.

By default, denite uses grep for fuzzy finder. I replaced this with ripgrep

brew install ripgrep

Add the below configuration in init.nvim .

The key take aways on the above configurations are the below mappings:

; — Browser currently open buffers
<leader>t — Browse list of files in current directory
<leader>g — Search current directory for occurrences of given term and close window if no results
<leader>j— Search current directory for occurrences of word under cursor

When in filter mode:

<C-o> — Switch to normal mode inside of search results
<Esc> — Exit denite window in any mode
<CR> — Open currently selected file in any mode
<C-t> — Open currently selected file in a new tab
<C-v> — Open currently selected file a vertical split
<C-h> — Open currently selected file in a horizontal split


Install CoC.nvim.

Add the below configuration in init.nvim.

You can add or remove extensions by modifying the list of extentions in coc_global_extensions array above or installing them with:

:CocInstall <extension1> <extension2>

You can find extensions you can install here.

View installed extensions.

:CocList extensions

Update extensions.


Other plugins:

To install and update nvim plugins, open your init.vim file.

nvim ~/.config/nvim/init.nvim

Install plugins.


Update plugins when new versions come out.


You can view the full list of plugins and configuration I use here.


Thanks for reading! 🎉

Full-Stack Software Engineer • DevOps Engineer • MLOps Engineer