Skip to content

tabulon-ext/dotfiles---stow--huyvohcmc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Greetings, traveler!

This repository includes all of my opinionated configuration.

Prerequisites

Assume that you already installed homebrew, git, zsh, rbenv, nvm, neovim, and tmux.

Installation

Clone this project at $HOME:

git clone git@github.com:huyvohcmc/dotfiles.git
cd dotfiles

Use Homebrew to install some necessary packages defined in Brewfile:

brew bundle

Create a backup of your existing dotfiles, remove them in $HOME and install the new ones using stow:

make stow

To remove dotfiles:

make unstow

Post-installation

Install minpac, then open nvim and install all plugins with :PackUpdate. You should also run :checkhealth to check your nvim condition.

Install Tmux plugin manager and press prefix + I inside a tmux session to fetch the plugins listed in .tmux.conf.

Git configuration

To prevent people from accidentally committing under your name:

# ~/.gitconfig
[include]
  path = ~/.gitconfig.local

Where ~/.gitconfig.local is simply:

[user]
  name = <your_name>
  email = <your_email>

I also use a .gitmessage template for co-authored commits on GitHub:

# ~/.gitmessage
Co-authored-by: Linus Torvalds <torvalds@transmeta.com>
# ~/.gitconfig
[commit]
  verbose = true
  template = ~/.gitmessage

Zsh

I use Zplugin to manage Zsh plugins. The file .zshrc will automatically install Zplugin if it's not installed and then load the plugins. I use a customized version of the theme Zeit. The only difference between them is my version doesn't contain any Oh-My-Zsh functions.

0.14 milliseconds Zsh startup

$ for i in $(seq 1 10); do /usr/bin/time /bin/zsh -i -c exit; done
        0.14 real         0.09 user         0.04 sys
        0.14 real         0.09 user         0.04 sys
        0.14 real         0.09 user         0.04 sys
        0.14 real         0.09 user         0.04 sys
        0.14 real         0.09 user         0.04 sys
        0.14 real         0.09 user         0.04 sys
        0.14 real         0.09 user         0.04 sys
        0.14 real         0.09 user         0.04 sys
        0.14 real         0.09 user         0.04 sys
        0.14 real         0.09 user         0.04 sys

This can be achieved thanks to the lazy-loading mechanism applied to virtual environment loaders like Rbenv and Nvm:

# Rbenv
if [[ -s ~/.rbenv/shims/ruby ]]; then
  PATH=$HOME/.rbenv/shims:$PATH
fi
rbenv() {
  eval "$(command rbenv init - --no-rehash)"
  rbenv "$@"
}

# Nvm
export NVM_DIR=$HOME/.nvm
if [ -f $HOME/.nvm/alias/default ]; then
  PATH=${PATH}:${HOME}/.nvm/versions/node/v$(cat ~/.nvm/alias/default)/bin
fi
nvm() {
  [ -s $NVM_DIR/nvm.sh ] && source $NVM_DIR/nvm.sh
  nvm "$@"
}

Iosevka

Iosevka is one of the best font for programmers, it looks so good to the eye and supports ligatures. It also has many prebuilt variants, and if you build yourself you can customize the look of many different characters. Here is how I built an Iosevka version for my own:

  1. Clone the repository
  2. Ensure nodejs >= 8.4, ttfautohint and otfcc are installed
  3. Install necessary libs by npm install
  4. npm run build -- contents::iosevka (or npm run build -- contents::iosevka-term for term version)

Visit Iosevka's main repo for more build instructions.

Screenshot or it didn't happen

screenshot

Inspired By

and some other dotfiles on the internet.

License

This repository is available under the MIT license. Feel free to fork and modify the dotfiles as you please.

Releases

No releases published

Packages

 
 
 

Languages

  • Vim Script 49.7%
  • Shell 41.6%
  • Ruby 6.8%
  • Makefile 1.9%