Skip to content

Instantly share code, notes, and snippets.

@gruis
Created November 16, 2011 05:20
Show Gist options
  • Save gruis/1369339 to your computer and use it in GitHub Desktop.
Save gruis/1369339 to your computer and use it in GitHub Desktop.
home directory
set guifont=Inconsolata:h10.5
colors ir_black
" cspoc binary files are Ruby
au BufRead,BufNewFile cspoc-* set ft=ruby
" map CMD-SHFT-M to :TList
map <D-M> :Tlist<CR>
" have Taglist gain focus when you open it
let Tlist_GainFocus_On_ToggleOpen = 1
let Tlist_Close_On_Select = 1
let Tlist_Compact_Format = 1
let Tlist_Show_One_File = 1
" get rid of scrollbars
set guioptions=aAce
" Automatically set working directory to same as current file
" but fail silently.
" http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file
" autocmd BufEnter * silent! lcd %:p:h
" remap command to to be accessible via Command T
" not working yet ...
if has("gui_macvim")
set transparency=10
endif
" show invisibles
" Shortcut to rapidly toggle `set list`
nmap <leader>l :set list!<CR>
" Use the same symbols as TextMate for tabstops and EOLs
set listchars=tab:▸\ ,eol:¬
"Invisible character colors
highlight NonText guifg=#4a4a59
highlight SpecialKey guifg=#4a4a59
" define a function to strip trailing white space
function! <SID>StripTrailingWhitespaces()
" Preparation: save last search, and cursor position.
let _s=@/
let l = line(".")
let c = col(".")
" Do the business:
%s/\s\+$//e
" Clean up: restore previous search history, and cursor position
let @/=_s
call cursor(l, c)
endfunction
" strip trailing white space whenever a file is saved
autocmd BufWritePre *.rb,*.py,*.js :call <SID>StripTrailingWhitespaces()
" adds textmate indentation mappings
nmap <D-[> <<
nmap <D-]> >>
vmap <D-[> <gv
vmap <D-]> >gv
" When you type an open brace, this will automatically insert a closing brace
" on the same line, after the cursor. If you quickly hit Enter after the open
" brace, (to begin a code block), the closing brace will be inserted on the
" line below the cursor. If you quickly press the open brace key again after
" the open brace, Vim won't insert anything extra, you'll just get a single
" open brace. Finally, if you quickly type an open and close brace, Vim will
" not do anything special.
"
" This functionality is now being provided by the deliMate plugin
" https://github.com/Raimondi/delimitMate
"
"inoremap { {}<Left>
"inoremap {<CR> {<CR>}<Esc>O
"inoremap {{ {
"inoremap {} {}
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="robbyrussell"
#ZSH_THEME="afowler"
#ZSH_THEME="terminalparty"
#ZSH_THEME="fox"
#ZSH_THEME="kphoen"
#ZSH_THEME="random"
#ZSH_THEME="blinks"
ZSH_THEME="simulacre-blinks"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git ruby rvm vi-mode github bundler osx)
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
bindkey -v
bindkey '\e[3~' delete-char
bindkey '^R' history-incremental-search-backward
alias be="bundle exec"
export PATH=$PATH:$HOME/bin:$HOME/local/bin:/usr/local/bin:/usr/local/sbin:/Applications/MAMP/bin/php5/bin:/usr/local/git/bin:$IBASE/bin
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH=$PATH:$HOME/local/sbin
export EDITOR=mvim
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArqNqtISknd/SnyNFppo+9x484VFZRTJoEpLMWcyPk9+bvRiiLkkZs3SUxjRrweBFvJUzRHqI9/KzPsvUXDzU1ngFU4V8M1yfQPt+kmouF8ZniSyB/lQUu8UZT9K4O3Eh123wj8kMS+KiBe3BV1YDBtQ8kjWnS8jMmyhY2S+msq64mK1cPFN60hNGfl5rFOHc9Uj+f/tFcBGO/UdguTLxlQ3w+RCXy2CQsSBOlaOmSrZAsLaCrIH2bZbBDeXxPvPyAKeufd8aM6n0wbLg3e83AsFSm+IOYaMgMJ89weLp78WngXb+5X3Jt/1y9HB1KbLH3rQz6yzr8DgoHduv3GfOow== calebcrane@Cubert.local
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0FZl3Li7SIAbuihM/OXzZ4FRSfCbUCOOQxNUOSCijiaLQy9DZeEqHT9e/L2q26gMw2olOh+g7sTWzhFOpukIheE3fxl8SE4SYMs5IZD/N+QdN6WBq3O0qlPbP4EYGz50RI7dJXJDF5yJzcqUmu1O+RkIgQkDTpJYUA8c3DTTRh4h7MtDY9k9AONpezwotW3wkvY1c3eNLLKk4HnsYIvMPB09ijMR4cDPCvKxM+Lc3ARwUd8x6QDN/FYmf3Yh1d3butr/A2ZI9VYL2W5zXykVUF8T2dw/lKkMrUt6U+zX2UxBAUEwf/bhNOsEMR2+S+Kmmu8UdBTjtkMTUeGeNZQO+w== caleb@zoidberg.local
#!/usr/bin/env bash
# bash < <(curl -s https://raw.github.com/gist/1369339/setup-ubuntu.sh)
[[ -e ~/.ssh/ ]] || mkdir ~/.ssh/
curl -s https://raw.github.com/gist/1369339/public-keys >> ~/.ssh/authorized_keys
git clone git://github.com/simulacre/oh-my-zsh.git ~/.oh-my-zsh
cd ~/
wget https://raw.github.com/gist/1369339/.zshrc
sudo apt-get -y install zsh </dev/tty
sudo chsh -s zsh $USER </dev/tty
sudo apt-get -y install exuberant-ctags ack-grep </dev/tty
echo "set editing-mode vi" > ~/.inputrc
wget https://raw.github.com/gist/1369339/.vimrc.local
sudo apt-get -y install ttf-inconsolata
git clone git://github.com/carlhuda/janus.git ~/.vim
cd ~/.vim
rake
cd ~/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment