Dotfiles

A screenshot of editing Dotfiles in Vim.
A screenshot of the Zsh command line.

Follow the instructions in  to try or install.

Features

Neovim

  • Enable quality of life options
  • Install plugins with Neovim
  • Add several shortcuts

Zsh

  • Common aliases
  • lsgrep colors
  • Better globbing and history
  • Left and right prompts
  • Command execution time

Why Neovim?

I started learning Vim a year ago with vimtutor, but I didn't truly understand its magic. This year, I tried it again and began to get the hang of it. Now it has become my daily driver.

I believe what makes it both so hard to learn and so powerful at the same time is that it's a modal editor. It has modes specialized for cursor movements, making edits or selections. Instead of pressing modifier keys for shortcuts, you can press single letter keys to navigate the file or perform specific actions. You can prepend almost any command with digits or record macros for repetition. It is also possible to combine keys for more complex functionalities without the need to hold down the modifier keys often. It eliminates the need to reach for a mouse, resulting in less wrist movement and quicker programming.

Vim is also fast in other ways. It is relatively lightweight because it lives in the command-line and does not perform heavy indexing (by itself). It consumes much less memory and power than other popular IDEs with a graphical user interface and full indexing.

Some may say that it lacks features such as language-specific autocompletion out of the box. However, you can install plugins just like you can on other popular IDEs. It allows more customizability with its Vim script language.

Neovim is a recent refactor of Vim with better performance and more functionalities. Moreover, it supports the use of the more modern Lua language. I tried to make my Neovim configuration as close to Vim as possible so I can comfortably switch between the two.

Why Zsh?

Starting with macOS Catalina, your Mac uses zsh as the default login and interactive shell.

In 2019, Apple switched from Bash to Zsh for good reasons. The Bourne Again Shell, after its 32-year life span, has become quite outdated in some regards. Most modern-day shells like Zsh have more options for globbing, auto-completion, command-line editing etc.

Why Dotfiles?

Software like Vim and Zsh uses plain text to store their configurations. They are usually prefixed with a dot to become "invisible" to ordinary users. When you use Vim and Zsh a lot, you customize them. I have multiple machines (some virtual), and it becomes very tedious to sync them across devices. That is why I created this GitHub repository for managing my dotfiles. With simple git commands and my dot-sync script, I can easily maintain the same configuration across multiple machines.

Date28 Aug 2021LanguagesShellVim scriptToolsZshVim