Skip to content

Instantly share code, notes, and snippets.

@rummik
Last active August 29, 2015 14:17
Show Gist options
  • Save rummik/d67e09711a5ce5516cf2 to your computer and use it in GitHub Desktop.
Save rummik/d67e09711a5ce5516cf2 to your computer and use it in GitHub Desktop.
Old vs new dotfiles
# enable mouse support
set-option -g mouse-utf8 on
set-option -g mouse-resize-pane on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
# more logical window splits
unbind-key '%'
unbind-key '"'
bind-key '|' split-window -h -c "#{pane_current_path}"
bind-key '\' split-window -v -c "#{pane_current_path}"
# some happy defaults
set-window-option -g mode-keys vi
# colors
set-option -g pane-active-border-fg brightmagenta
set-option -g pane-border-fg brightblack
set-option -g display-panes-colour green
set-option -g display-panes-active-colour brightred
set-option -g clock-mode-colour brightwhite
set-option -g mode-bg magenta
set-option -g mode-fg brightwhite
set-window-option -g window-status-bg black
set-window-option -g window-status-fg brightgreen
set-window-option -g window-status-current-bg black
set-window-option -g window-status-current-fg brightwhite
set-window-option -g window-status-bell-bg black
set-window-option -g window-status-bell-fg brightred
set-window-option -g window-status-activity-bg black
set-window-option -g window-status-activity-fg brightred
set -g status-bg black
set -g status-fg brightmagenta
set -g message-bg magenta
set -g message-fg brightwhite
# vim: set ft=sh :
set nocompatible
" Pretty up the UI
set number
"" Syntax highlighting options
set background=dark
syntax on
""" Highlight tabs and extra spaces (Options for SpaceHi)
let g:spacehi_tabcolor='gui=underline guifg=darkmagenta ctermfg=darkmagenta cterm=underline'
let g:spacehi_spacecolor='gui=underline guifg=red ctermfg=red cterm=underline'
""" Column markers
hi ColorColumn ctermbg=darkgrey guibg=darkgrey
set colorcolumn=80,100,120
"" Folding
set foldmethod=indent
set foldcolumn=1
set foldlevel=1
set foldtext=MyFoldText()
function! MyFoldText()
let n = v:foldend - v:foldstart + 1
let i = indent(v:foldstart)
let istr = ''
while i > 0
let istr = istr . ' '
let i = i - 1
endwhile
return istr . "+-" . v:folddashes . " " . n . " lines "
endfunction
"" CLI options
set title
set mouse=a
set spelllang=en_us
"" GUI options
set guioptions-=T " Remove toolbar
if has("gui_running")
set background=light
colors tango
endif
" Temp files and backups
set nobackup
"set backup
"set backupdir=~/.vim/backup
set directory=~/.vim/tmp
" Vundle
filetype off
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'kien/ctrlp.vim'
Plugin 'scrooloose/syntastic'
Plugin 'tpope/vim-fugitive'
Plugin 'briancollins/vim-jst'
Plugin 'claco/jasmine.vim'
Plugin 'othree/html5.vim'
Plugin 'othree/javascript-libraries-syntax.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'burnettk/vim-angular'
Plugin 'rummik/vim-ng-snippets'
Plugin 'wavded/vim-stylus'
"Plugin 'emgram769/vim-multiuser'
Plugin 'wakatime/vim-wakatime'
call vundle#end()
" CoVim
let CoVim_default_name = "rummik"
let CoVim_default_port = "54321"
" UltiSnips
let g:UltiSnipsExpandTrigger="<c-j>"
let g:UltiSnipsJumpForwardTrigger="<c-j>"
let g:UltiSnipsJumpBackwardTrigger="<c-k>"
let g:UltiSnipsEditSplit="vertical"
" Indent options
filetype plugin indent on
set autoindent
set smartindent
set nocindent
set smarttab
" Make paragraph formatting a bit better (gq)
set formatprg = "par 79"
" Use .vimrc_local.vim instead of _vimrc_local.vim
let g:local_vimrc = '.vimrc_local.vim'
" 2HTML
let html_use_css = 1
let html_no_hyperlinks = 1
let use_xhtml = 1
let html_ignore_folding = 1
if exists('html_no_pre')
unlet html_no_pre
endif
" Language specific stuff
"" PHP
let php_sql_query = 1
let PHP_removeCRwhenUnix = 1
let PHP_default_indenting = 1
let php_show_semicolon = 0
"" Javascript
let javaScript_alternateSwitch = 1
# Ayup
export EDITOR=vim
export BROWSER=$(which google-chrome chromium-browser firefox links2 links lynx | grep -Pm1 '^/')
export TZ=America/New_York
export GPG_TTY=`tty`
# Yes, really
export PATH=$PATH:~/.bin
export PATH=$PATH:/sbin:/usr/sbin
# Constantly needing this
autoload -U zcalc
# Aliases
which links2 >/dev/null && alias links=links2
which htop >/dev/null && alias top=htop
which ack-grep >/dev/null && alias ack=ack-grep
which mosh >/dev/null && alias mosh='mosh -a'
alias info='info --vi-keys'
# Useful things
alias drop-caches='echo 3 | sudo tee /proc/sys/vm/drop_caches'
tailf() { tail -f $2 | while read j; do print -n "\n$j"; done }
mkcd() { mkdir -p $@; cd $_ }
ing() {
local host=$1
ping $1 | while read line; do
[[ $line -pcre-match 'time=(\d+\.?\d* ms)' ]] &&
print -n "\n$host: $MATCH[1]" #"\n$1: $(grep -Po '\d+\.?\d* ms' <<< $j)"
done
}
# Bleck. These shouldn't be at the end of the file.
export PATH=$PATH:$HOME/.rvm/bin
export PATH=/usr/local/heroku/bin:$PATH
[[ -f ~/.travis/travis.sh ]] && source ~/.travis/travis.sh
# Autocompletion for various things
which grunt >/dev/null && eval "$(grunt --completion=zsh)"
# default bindings for zsh-users/zsh-history-substring-search
zmodload zsh/terminfo
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
bindkey -M emacs '^P' history-substring-search-up
bindkey -M emacs '^N' history-substring-search-down
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
# For historical purposes
HISTSIZE=10000
SAVEHIST=8500
# Oh My ZSH!
ZSH_THEME="rummik"
COMPLETION_WAITING_DOTS="true"
[[ ! -f ~/.zshenv || -z $(grep DEBIAN_PREVENT_KEYBOARD_CHANGES ~/.zshenv) ]] &&
print "DEBIAN_PREVENT_KEYBOARD_CHANGES=yes" >> ~/.zshenv
# Antigen <3
[[ ! -d ~/.lib/antigen ]] &&
mkdir -p ~/.lib && git clone https://github.com/zsh-users/antigen.git ~/.lib/antigen
. ~/.lib/antigen/antigen.zsh
antigen use oh-my-zsh
antigen theme rummik/zsh-theme
antigen bundles <<EOBUNDLES
rummik/zsh-isup
#rummik/zsh-blog
rummik/zsh-dotty
rummik/zsh-adminer
rummik/zsh-unrpm
rummik/zsh-psmin
rummik/zsh-stt
rummik/zsh-pyhttp
rummik/zsh-dokku
rummik/patpat
rummik/9k1.us
#sprunge
#wakeonlan
#nyan
#git
#github
#npm
#heroku
#screen
#vundle
#debian
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-history-substring-search
EOBUNDLES
antigen apply
setopt nocorrectall
dotty remote rummik/dotfiles
# Source user's zshrc
[[ -f ~/.zsh_userrc ]] && . ~/.zsh_userrc
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment