summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2016-01-28 15:28:38 -0500
committerJune McEnroe <programble@gmail.com>2016-01-28 15:28:38 -0500
commit16b48d3c3d4d9851f4e8a81f546d2e2a0190733b (patch)
tree91afe3e0e9acb7bf9b38f6bb01d10941cf7b75b0
parentTrim tmux configuration (diff)
downloadsrc-16b48d3c3d4d9851f4e8a81f546d2e2a0190733b.tar.gz
src-16b48d3c3d4d9851f4e8a81f546d2e2a0190733b.zip
Strip out useless comments
-rw-r--r--.tmux.conf18
-rw-r--r--.vimrc51
-rw-r--r--.zshrc108
3 files changed, 48 insertions, 129 deletions
diff --git a/.tmux.conf b/.tmux.conf
index 4d322c9f..bc0a0102 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -1,57 +1,39 @@
-# Use the same prefix as screen, press a again to pass through
 unbind C-b
 set -g prefix C-a
 bind a send-prefix
 
-# Prevent escape key delay
 set -g escape-time 0
 
-# Enable colors
 set -g default-terminal 'screen-256color'
 
-# Start windows at 1 rather than 0
 set -g base-index 1
 
-# Status line on top
 set -g status-position top
 
-# Create new windows in same directory
 bind t new-window -c '#{pane_current_path}'
-
-# Move windows around by swapping
 bind . command-prompt "swap-window -t '%%'"
 
-# Split windows like vim, in same directory
 bind s split-window -v -c '#{pane_current_path}'
 bind v split-window -h -c '#{pane_current_path}'
 
-# Move between panes like vim
 bind h select-pane -L
 bind j select-pane -D
 bind k select-pane -U
 bind l select-pane -R
 
-# Move panes sort of like vim
 bind L swap-pane -D
 bind H swap-pane -U
 
-# Resize panes like vim
 bind -r < resize-pane -L 1
 bind -r > resize-pane -R 1
 bind -r - resize-pane -D 1
 bind -r + resize-pane -U 1
 
-# Vi-style controls for copy mode
 setw -g mode-keys vi
-
-# Copy and Paste like vim
 bind -t vi-copy v begin-selection
 bind -t vi-copy C-v rectangle-toggle
 bind -t vi-copy y copy-selection
 bind p paste-buffer
 
-# Switch panes like C-w C-w in vim
 bind C-a last-pane
-
-# Balance vertical panes
 bind = select-layout even-horizontal
diff --git a/.vimrc b/.vimrc
index 1a266c74..1e1175c4 100644
--- a/.vimrc
+++ b/.vimrc
@@ -1,62 +1,29 @@
 set nocompatible
-
-" Backspace past beginning of line in insert mode.
-set backspace=indent,eol,start
-
-" Allow switching buffers without saving.
 set hidden
+set ttimeoutlen=0
+set shortmess=atI
+set visualbell t_vb=
+set backspace=indent,eol,start
+set wildmenu wildmode=list:longest
 
-" Show cursor position and incomplete commands, always show status line.
-set ruler showcmd laststatus=2
-
-" Always show one extra line at the top or bottom of the window.
-set scrolloff=1
-
-" Search incrementally with smart case sensitivity, highlight all matches.
 set incsearch ignorecase smartcase hlsearch
-
-" Automatic indentation and adjust with tab and backspace.
 set autoindent smartindent smarttab
+set tabstop=4 expandtab shiftwidth=2 shiftround
 
-" Show line numbers, highlight current line and fixed columns.
-set number cursorline colorcolumn=80,100
-
-" Set window title.
 set title
-
-" Shorten messages and disable intro screen
-set shortmess=atI
-
-" Disable audible bell.
-set visualbell t_vb=
-
-" Prevent delay when returning to norml mode in terminal vim.
-set ttimeoutlen=0
-
-" Show hard tabs and trailing whitespace
+set ruler showcmd laststatus=2
+set scrolloff=1
+set number cursorline colorcolumn=80,100
 set list listchars=tab:»·,trail:·
-
-" Show hard tabs as 4 side, use 2 space indentation rounded to multiples.
-set tabstop=4 expandtab shiftwidth=2 shiftround
-
-" Syntax highlighting, filetype indentation rules.
 syntax on
 filetype plugin indent on
 
-" Show tab-complete suggestions and complete longest substring.
-set wildmenu wildmode=list:longest
-
-" Swap , and \ for leader.
 noremap \ ,
 let mapleader = ','
-
-" Clear search results.
 nmap <leader>n :nohlsearch<CR>
 
-" Set GUI font and disable GUI features.
 set guifont=ProFont:h11 guioptions=c
 
-" Configure gruvbox colorscheme.
 set background=dark
 let g:gruvbox_termcolors = 16
 let g:gruvbox_italic = 0
diff --git a/.zshrc b/.zshrc
index e30f41ee..d07db0d3 100644
--- a/.zshrc
+++ b/.zshrc
@@ -1,29 +1,54 @@
-# Save 5000 lines of history, writing after each command, ignoring duplicates.
+unsetopt beep
+setopt nomatch interactive_comments
+
 HISTFILE=~/.history
 HISTSIZE=SAVEHIST=5000
 setopt inc_append_history hist_ignore_dups
 
-# Error if glob does not match.
-setopt nomatch
-
-# Allow comments in interactive shell.
-setopt interactive_comments
-
-# No.
-unsetopt beep
-
-# Vim line editing, eliminate escape key delay.
 bindkey -v
 KEYTIMEOUT=1
 
-# Initialize completion and colors.
 autoload -Uz compinit && compinit
 autoload colors && colors
 
-# Color prompt magenta over SSH.
+PATH=$PATH:~/.bin
+export EDITOR=vim
+export CLICOLOR=1 # color ls output on OS X
+
+[[ "$OSTYPE" =~ 'darwin' ]] && alias osx=true || alias osx=false
+osx || alias ls='ls --color'
+osx || alias grep='grep --color'
+osx && alias rm='rm -v' || alias rm='rm -vI'
+osx && alias gvim=mvim || alias gvim='gvim 2> /dev/null'
+
+tn() { [ -n "$1" ] && tmux new -s "$1" || tmux new }
+ta() { [ -n "$1" ] && tmux attach -t "$1" || tmux attach }
+
+alias ga='git add'
+alias gb='git branch'
+alias gc='git commit'
+alias gca='git commit --amend'
+alias gcl='git clone'
+alias gco='git checkout'
+alias gd='git diff'
+alias gl='git log --graph --pretty=log'
+alias gm='git merge'
+alias gmv='git mv'
+alias gp='git push'
+alias gr='git rebase'
+alias grc='git rebase --continue'
+alias grs='git rebase --skip'
+alias gra='git rebase --abort'
+alias grm='git rm'
+alias gs='git status -sb'
+alias gsh='git show'
+alias gst='git stash'
+alias gt='git tag'
+alias gu='git pull'
+alias gf='git fetch'
+
 [[ -n "$SSH_CLIENT" ]] && _prompt_ssh_color="$fg[magenta]"
 
-# Color prompt yellow in vi normal mode.
 function zle-line-init zle-keymap-select {
   _prompt_vi_color=
   [[ "$KEYMAP" == "vicmd" ]] && _prompt_vi_color="$fg[yellow]"
@@ -32,7 +57,6 @@ function zle-line-init zle-keymap-select {
 zle -N zle-line-init
 zle -N zle-keymap-select
 
-# Show git branch or commit in right prompt.
 _prompt_git_branch() {
   [[ -f .git/HEAD ]] || return 0
   local head
@@ -47,16 +71,12 @@ _prompt_git_branch() {
   esac
 }
 
-# Single colored character prompt, directory and git branch in right prompt.
 setopt prompt_subst
 PROMPT='%{%(?.$fg[green]$_prompt_ssh_color.$fg[red])$_prompt_vi_color%}»%{$reset_color%} '
 RPROMPT='%{$fg[blue]%}%-50<…<%~%{$fg[yellow]%}$(_prompt_git_branch)%{$reset_color%}'
 
-# Print a newline before every prompt after the first one.
 _newline_precmd() { _newline_precmd() { echo } }
 
-# Set title to directory name at prompt, prefixed with hostname over SSH. Add
-# current command to title while running.
 _title() {
   [[ "$TERM" =~ 'xterm' ]] && print -Pn "\e]0;$@\a"
 }
@@ -69,55 +89,6 @@ typeset -ga precmd_functions
 preexec_functions+=(_title_preexec)
 precmd_functions+=(_newline_precmd _title_precmd)
 
-# General environment setup.
-PATH=$PATH:~/.bin
-export EDITOR=vim
-export CLICOLOR=1 # color ls output on OS X
-
-# Detect OS X for conditional aliases.
-[[ "$OSTYPE" =~ 'darwin' ]] && alias osx=true || alias osx=false
-
-# Color output on Linux.
-osx || alias ls='ls --color'
-osx || alias grep='grep --color'
-
-# Verbose output from rm with confirmation on Linux.
-osx || alias rm='rm -vI'
-osx && alias rm='rm -v'
-
-# Suppress output from Linux gvim, alias gvim to MacVim.
-osx || alias gvim='gvim 2> /dev/null'
-osx && alias gvim=mvim
-
-tn() { [ -n "$1" ] && tmux new -s "$1" || tmux new }
-ta() { [ -n "$1" ] && tmux attach -t "$1" || tmux attach }
-
-alias g=git
-alias ga='git add'
-alias gb='git branch'
-alias gc='git commit'
-alias gca='git commit --amend'
-alias gcl='git clone'
-alias gco='git checkout'
-alias gd='git diff'
-alias gl='git log --graph --pretty=log'
-alias gm='git merge'
-alias gmv='git mv'
-alias gp='git push'
-alias gr='git rebase'
-alias grc='git rebase --continue'
-alias grs='git rebase --skip'
-alias gra='git rebase --abort'
-alias grm='git rm'
-alias gs='git status -sb'
-alias gsh='git show'
-alias gst='git stash'
-alias gt='git tag'
-alias gu='git pull'
-alias gf='git fetch'
-
-alias hu=heroku
-
 [[ -f ~/.nvm/nvm.sh ]] && source ~/.nvm/nvm.sh
 
 if [[ -d /usr/local/share/chruby ]]; then
@@ -125,5 +96,4 @@ if [[ -d /usr/local/share/chruby ]]; then
   chruby ruby
 fi
 
-# Prevent red first prompt.
 true