set -o vi
PATH
VariableUse cases:
To use:
export PATH="$PATH:/path/to/some/folder"
Pros:
For more information: https://github.com/jez/starter-zshrc
For more information: https://github.com/jez/dotfiles/blob/a92fe3d7649/util/aliases.sh
For more information: https://github.com/seebi/dircolors-solarized
Open man pages in Vim. Why?
~/.inputrc
This file lets you configure how you interact with shell prompts.
It configures any program which links against the readline
library.
Some examples:
bash
python
rlwrap
Features:
set -o vi
, but for all
readline programs)For more information: https://github.com/jez/dotfiles/blob/master/inputrc
For how to do these things in zsh: https://github.com/jez/starter-zshrc
The terminal already supports bold and colored text.
We can make it support italic text.
For more information: https://alexpearce.me/2014/05/italics-in-iterm2-vim-tmux/
These are a sampling of some of my aliases which you might find useful.
alias ls="ls -p --color=auto"
alias cp="cp -v"
alias mv="mv -v"
alias rm="rm -v"
# so much easier to type than `cd ..`
alias cdd="cd .."
alias cddd="cd ../.."
alias cdddd="cd ../../.."
alias cddddd="cd ../../../.."
alias cdddddd="cd ../../../../.."
alias cddddddd="cd ../../../../../.."
# open multiple files in Vim tabs
alias vim="vim -p"
# open multiple files in Vim vertical splits
alias vimv="vim -O"
# I'm pretty proud of these ones
alias :q="clear"
alias :tabe="vim"
alias :vs="vimv"
# ----- aliases that are actually full-blown commands -------------------------
# list disk usage statistics for the current folder
alias duls="du -h -d1 | sort -hr"
# resolve a symlink in the PWD to a fully qualified directory
alias resolve='cd "$(pwd -P)"'
# How much memory is Chrome using right now?
alias chromemem="ps -ev | grep -i chrome | awk '{print \$12}' | awk '{for(i=1;i<=NF;i++)s+=\$i}END{print s}'"
# ----- git aliases -----------------------------------------------------------
alias gco="git checkout"
alias ga="git add"
alias gap="git add --patch"
alias gc="git commit -v"
alias gca="gc -a"
alias gcm="git commit -m"
alias gcam="git commit -am"
alias gs="git status"
alias gd="git diff"
alias gf="git fetch"
alias gfp="git fetch --prune"
alias gpf="git pull --ff-only"
alias gl="git log --graph --oneline --decorate --abbrev-commit --all"