Mercurial > dotfiles.old
changeset 0:36a9b3a28861
Add all dotfiles
author | zegervdv <zegervdv@me.com> |
---|---|
date | Sun, 23 Feb 2014 17:20:32 +0100 |
parents | |
children | 4687ecd3ea52 |
files | .hgsub .hgsubstate Brewfile gemrc gitconfig gitignore hooks/post-up hooks/pre-up octaverc oh-my-zsh/themes/custom.zsh-theme powconfig pryrc rcrc templates/report.tex tmux.conf vim/after/plugin/abolish.vim vim/autoload/pathogen.vim vim/snippets/ruby.snip vim/snippets/tex.snip vimrc zshrc |
diffstat | 21 files changed, 1243 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgsub Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,43 @@ +vim/bundle/nerdtree = [git]https://github.com/scrooloose/nerdtree.git +vim/bundle/ctrlp = [git]https://github.com/kien/ctrlp.vim.git +vim/bundle/cucumber = [git]https://github.com/tpope/vim-cucumber.git +vim/bundle/rails = [git]https://github.com/tpope/vim-rails.git +vim/bundle/rspec = [git]https://github.com/thoughtbot/vim-rspec.git +vim/bundle/ruby = [git]https://github.com/vim-ruby/vim-ruby.git +vim/bundle/sensible = [git]https://github.com/tpope/vim-sensible.git +vim/bundle/surround = [git]https://github.com/tpope/vim-surround.git +vim/bundle/vhdl = [git]https://github.com/allgood38/vim-vhdl.git +vim/bundle/addon-mw-utils = [git]https://github.com/MarcWeber/vim-addon-mw-utils.git +vim/bundle/tlib = [git]https://github.com/tomtom/tlib_vim.git +vim/bundle/latex = [git]git://git.code.sf.net/p/vim-latex/vim-latex +vim/bundle/fugitive = [git]https://github.com/tpope/vim-fugitive.git +vim/bundle/easy-motion = [git]https://github.com/Lokaltog/vim-easymotion.git +vim/bundle/tcomment = [git]https://github.com/tomtom/tcomment_vim.git +vim/bundle/ack = [git]https://github.com/mileszs/ack.vim.git +vim/bundle/tabular = [git]https://github.com/godlygeek/tabular.git +vim/bundle/emmet = [git]https://github.com/mattn/emmet-vim.git +vim/bundle/endwise = [git]https://github.com/tpope/vim-endwise.git +vim/bundle/markdown = [git]https://github.com/tpope/vim-markdown.git +vim/bundle/neosnippet = [git]https://github.com/Shougo/neosnippet.vim.git +vim/bundle/bundler = [git]https://github.com/tpope/vim-bundler.git +vim/bundle/rake = [git]https://github.com/tpope/vim-rake.git +vim/bundle/airline = [git]https://github.com/bling/vim-airline +vim/bundle/hybrid = [git]https://github.com/w0ng/vim-hybrid.git +vim/bundle/eunuch = [git]https://github.com/tpope/vim-eunuch.git +vim/bundle/tagbar = [git]https://github.com/majutsushi/tagbar.git +vim/bundle/ctrlp-cmdpalette = [git]https://github.com/fisadev/vim-ctrlp-cmdpalette.git +vim/bundle/a = [git]https://github.com/vim-scripts/a.vim.git +vim/bundle/slim = [git]https://github.com/slim-template/vim-slim.git +vim/bundle/auto-pairs = [git]https://github.com/jiangmiao/auto-pairs.git +vim/bundle/vis = [git]https://github.com/AzizLight/vis.vim.git +vim/bundle/gundo = [git]http://github.com/sjl/gundo.vim.git +vim/bundle/syntastic = [git]https://github.com/scrooloose/syntastic.git +vim/bundle/yankring = [git]https://github.com/vim-scripts/YankRing.vim.git +vim/bundle/neocomplete = [git]https://github.com/Shougo/neocomplete.vim.git +vim/bundle/indent-guides = [git]https://github.com/nathanaelkane/vim-indent-guides.git +vim/bundle/tomdoc = [git]https://github.com/duwanis/tomdoc.vim.git +vim/bundle/signature = [git]https://github.com/kshenoy/vim-signature.git +vim/bundle/abolish = [git]https://github.com/tpope/vim-abolish.git +vim/bundle/repeat = [git]https://github.com/tpope/vim-repeat.git +vim/bundle/neosnippet-snippets = [git]https://github.com/Shougo/neosnippet-snippets.git +vim/bundle/ag = [git]https://github.com/rking/ag.vim.git
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgsubstate Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,43 @@ +2cbe946206ec622d9d8cf2c99317f204c4d41885 vim/bundle/a +c44ee4b1565c3de43c6530a044eba97db8591dea vim/bundle/abolish +f183a345a0c10caed7684d07dabae33e007c7590 vim/bundle/ack +0c5612fa31ee434ba055e21c76f456244b3b5109 vim/bundle/addon-mw-utils +a93df9ceb842a0058507e2149e4b332e15c13845 vim/bundle/ag +6aac1b469d3ef47c5c871559b9322d5dc5415347 vim/bundle/airline +c2f60ca2e57fb65d2230c6fe58e7aba5ab065b2e vim/bundle/auto-pairs +51b00aeba9476b1acf31034a5aaa6fc82f22331a vim/bundle/bundler +b5d3fe66a58a13d2ff8b6391f4387608496a030f vim/bundle/ctrlp +a2ec838f3cb1fc292f9dd0bf46fc966b99db91ac vim/bundle/ctrlp-cmdpalette +9e686ad36da43eae7462612fb8123bd47ea16171 vim/bundle/cucumber +a4205c54ac1907b022bf813ecf355673aa850050 vim/bundle/easy-motion +fb11bd8b28fe30a4e95f8daacab34ccc2e6377e3 vim/bundle/emmet +c3d8fe0207d572047f8cde913b70e07f34758392 vim/bundle/endwise +6a4d1933ad61ad94f2fa06905337a51cb0304ac1 vim/bundle/eunuch +8f0b8edfbd246c0026b7a2388e1d883d579ac7f6 vim/bundle/fugitive +3975ac871565115e3769dc69c06bc88ddc1369af vim/bundle/gundo +90048c732a5362b1813c98f8089893b4fd2ce211 vim/bundle/hybrid +eec1b629dc4cfa3986d20f21d4b4489732cd3f5a vim/bundle/indent-guides +eaa765eeadb51c3a8e2caf16d1e67359bf89cab9 vim/bundle/latex +61deff1362b5ea4c63eead77a52c51316fa7d433 vim/bundle/markdown +8be3a0c7dcde61e67289b8ed820363dad792b40e vim/bundle/neocomplete +bc2d1772a21b64a209980915a6f93f42b30d05cb vim/bundle/neosnippet +a868340006f4c0918969c67887c92019b35edd10 vim/bundle/neosnippet-snippets +b0bb781fc73ef40365e4c996a16f04368d64fc9d vim/bundle/nerdtree +23b1b9c00b368ebd0135faf000556d2d7cbf90f5 vim/bundle/rails +6b763058436964f1e20243200060ae78c0bd7a1d vim/bundle/rake +2a3c5f8e3c26a57b8eb4cfc4be79615a1c508ef6 vim/bundle/repeat +e001dbeba5e18ee1e622fe85ede0b1e9867c99e6 vim/bundle/rspec +622c0a88cfa5d00dd5325b87611eea2463e2baf2 vim/bundle/ruby +ada47584c3b3dbfda7473358070517f0d8ec5053 vim/bundle/sensible +4b8ecde90f2059b982f280801c7936c8b86a8b99 vim/bundle/signature +8e2466a3de21d832cd9c19f309a9cec6c2f2e039 vim/bundle/slim +42e9b46e7a20a2f394664874c7bbd9d6f6c39e8a vim/bundle/surround +d12bc4f1d122a5e60d08d765acde58272cb84cbb vim/bundle/syntastic +60f25648814f0695eeb6c1040d97adca93c4e0bb vim/bundle/tabular +614b5b244f3a7a9e0174ebcf73c809de6e62e32c vim/bundle/tagbar +51c2317bc5dffb3c3a364e53b8d7c483ced549ed vim/bundle/tcomment +47bf87ce543349a22c42bc7ae65845dd5ce1e614 vim/bundle/tlib +7bfdda29120dbab0787c966dd35db025305675e1 vim/bundle/tomdoc +6c7b03a2a0abdfd0dabd26602f8a32955abe0181 vim/bundle/vhdl +22fa4e57fa3b0e4c9a83de51717b621fe9ca8cd7 vim/bundle/vis +a884f3a161fa3cd8c996eb53a3d1c68631f60c21 vim/bundle/yankring
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Brewfile Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,33 @@ +tap thoughtbot/formulae +install rcm + +install zsh +install macvim --with-lua --with-ruby +install vim +install tmux +install brew-cask +install git + +install the_silver_searcher + +install readline +install reattach-to-user-namespace + +install ctags + +install ruby-build +install rbenv + +install python + +install ssh-copy-id + + +cask install handbrake +cask install transmission +cask install tvshows +cask install xquartz +cask install virtualbox +cask install subler +cask install mactex +cask install vagrant
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gemrc Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,1 @@ +gem: --no-ri --no-rdoc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gitconfig Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,33 @@ +# Sample gitconfig +# + +[hub] + protocol = https +[alias] + co = checkout + count = !git shortlog -sn + sl = log --oneline --stat +[color] + diff = auto + status = auto + branch = auto + ui = true +[core] + excludesfile = ~/.gitignore + editor = vim +[apply] + whitespace = nowarn +[mergetool] + keepBackup = false +[difftool] + prompt = false +[help] + autocorrect = 1 +[include] + path = .gitconfig.local +[push] + # See `git help config` (search for push.default) + # for more information on different options of the below setting. + # + # Setting to git 2.0 default to surpress warning message + default = simple
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gitignore Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,77 @@ +## OSX + +.DS_Store +.AppleDouble +.LSOverride +Icon + + +# Thumbnails +._* + +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + + +## LINUX + + +## VIM + +*.s[a-w][a-z] +!*.sch +*.un~ +Session.vim +.netrwhist +tags + +### SASS Ignores - "Sassy CSS" http://sass-lang.com/ +*.sass-cache + +## RUBY + +*.gem +*.rbc +.bundle +.config +coverage +InstalledFiles +lib/bundler/man +pkg +rdoc +spec/reports +test/tmp +test/version_tmp +tmp + +# YARD artifacts +.yardoc +_yardoc +doc/ + +## C + +# Object files +*.o +*.ko + +# Libraries +*.lib +*.a + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app + + +# Latex Files +*.aux +*.log
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hooks/post-up Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ ! -e $HOME/.vim ]; then + ln -s $HOME/.dotfiles/vim $HOME/.vim +fi + +# Update plugins +cd $HOME/.dotfiles +git submodule init +git submodule update +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hooks/pre-up Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,38 @@ +#!/bin/sh + +if [ ! -e $HOME/.oh-my-zsh ]; then + echo "\033[0;34mCloning Oh My Zsh...\033[0m" + hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh || { + echo "git not installed" + exit + } + + echo "\033[0;34mLooking for an existing zsh config...\033[0m" + if [ -f ~/.zshrc ] || [ -h ~/.zshrc ] + then + echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32mBacking up to ~/.zshrc.pre-oh-my-zsh\033[0m"; + mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh; + fi + + echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m" + cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc + + echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" + echo "export PATH=\$PATH:$PATH" >> ~/.zshrc + + echo "\033[0;34mTime to change your default shell to zsh!\033[0m" + chsh -s `which zsh` + + echo "\033[0;32m"' __ __ '"\033[0m" + echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" + echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" + echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" + echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" + echo "\033[0;32m"' /____/ '"\033[0m" + + echo "\n\n \033[0;32m....is now installed.\033[0m" + /usr/bin/env zsh + source ~/.zshrc + sudo chsh -s `which zsh` `whoami` + +fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/octaverc Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,4 @@ +graphics_toolkit gnuplot + +edit mode async +EDITOR("mvim %s")
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/oh-my-zsh/themes/custom.zsh-theme Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,32 @@ +function get_pwd() { + echo "${PWD/$HOME/~}" +} + +eval my_gray='$FG[237]' +eval my_orange='$FG[214]' + + + +local git=$(git_prompt_info) +if [ ${#git} != 0 ]; then + ((git=${#git} - 10)) +else + git=0 +fi + +PROMPT=$'%{$fg[cyan]%}%m %{$fg[yellow]%}$(get_pwd) +%{$reset_color%}→ ' + +RPROMPT='$my_gray$(git_prompt_info) $(git_prompt_status)%{$reset_color%}%' + +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} U" +ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} A" +ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} D" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} R" +ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} M" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} U" + +ZSH_THEME_GIT_PROMPT_PREFIX="${my_gray}" +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="$my_gray%{$reset_color%}"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/powconfig Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,1 @@ +export PATH=$(rbenv root)/shims:$(rbenv root)/bin:$PATH
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pryrc Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,1 @@ +$EDITOR=mvim
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rcrc Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,1 @@ +EXCLUDES="vim Brewfile README.md Rakefile"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/report.tex Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,25 @@ +\documentclass[a4paper]{article} % Standaard een kolom layout +\usepackage[english]{babel} % Stel woordafbrekingen en referentienamen in +\usepackage{graphicx} % Afbeeldingen weergeven +\usepackage{float} % Figuren op plaats waar ze gedefinieerd staan: [H] +\usepackage{helvet} % Lettertype instellen op Helvetica +\usepackage[hidelinks]{hyperref} % Referenties aanklikbaar in PDF, geen kaders rond weergeven +\usepackage{siunitx} % SI unit symbolen +\usepackage{amsmath} % Matrices en vergelijkingen +\usepackage{subcaption} % Subfiguren + + +\title{} +\author{Zeger Van de Vannet} +\date{\today} + +\begin{document} +\maketitle + +% Inhoudstafel +% \newpage +% \tableofcontents +% \newpage + +\end{document} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tmux.conf Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,18 @@ +set -g prefix C-a +unbind C-b +bind C-a send-prefix + + +set -g default-terminal "screen-256color" +set-option -g status-left '' +set-option -g status-right " #[bg=cyan] %d %b %Y %H:%M " + +set -g mode-mouse on +set -g mouse-select-pane on +set -g mouse-select-window on +set -g terminal-overrides 'xterm*:smcup@:rmcup@' + +setw -g mode-keys vi + +bind -t vi-copy 'v' begin-selection +bind -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/after/plugin/abolish.vim Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,11 @@ +" Define some common typos + +Abolish teh the +Abolish hte the +Abolish {leng,wid,bandwid,streng}ht {}th +Abolish {heig}th {}ht +Abolish por{ject,gram} pro{} +Abolish {,de,re}sing{,s,ed} {}sign{} + +" Code typos +Abolish rpsec rspec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/autoload/pathogen.vim Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,326 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope <http://tpo.pe/> +" Version: 2.2 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" For management of individually installed plugins in ~/.vim/bundle (or +" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your +" .vimrc is the only other setup necessary. +" +" The API is documented inline below. For maximum ease of reading, +" :set foldmethod=marker + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +function! s:warn(msg) + echohl WarningMsg + echomsg a:msg + echohl NONE +endfunction + +" Point of entry for basic default usage. Give a relative path to invoke +" pathogen#incubate() (defaults to "bundle/{}"), or an absolute path to invoke +" pathogen#surround(). For backwards compatibility purposes, a full path that +" does not end in {} or * is given to pathogen#runtime_prepend_subdirectories() +" instead. +function! pathogen#infect(...) abort " {{{1 + for path in a:0 ? reverse(copy(a:000)) : ['bundle/{}'] + if path =~# '^[^\\/]\+$' + call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') + call pathogen#incubate(path . '/{}') + elseif path =~# '^[^\\/]\+[\\/]\%({}\|\*\)$' + call pathogen#incubate(path) + elseif path =~# '[\\/]\%({}\|\*\)$' + call pathogen#surround(path) + else + call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') + call pathogen#surround(path . '/{}') + endif + endfor + call pathogen#cycle_filetype() + return '' +endfunction " }}}1 + +" Split a path into a list. +function! pathogen#split(path) abort " {{{1 + if type(a:path) == type([]) | return a:path | endif + let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,') + return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")') +endfunction " }}}1 + +" Convert a list to a path. +function! pathogen#join(...) abort " {{{1 + if type(a:1) == type(1) && a:1 + let i = 1 + let space = ' ' + else + let i = 0 + let space = '' + endif + let path = "" + while i < a:0 + if type(a:000[i]) == type([]) + let list = a:000[i] + let j = 0 + while j < len(list) + let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g') + let path .= ',' . escaped + let j += 1 + endwhile + else + let path .= "," . a:000[i] + endif + let i += 1 + endwhile + return substitute(path,'^,','','') +endfunction " }}}1 + +" Convert a list to a path with escaped spaces for 'path', 'tag', etc. +function! pathogen#legacyjoin(...) abort " {{{1 + return call('pathogen#join',[1] + a:000) +endfunction " }}}1 + +" Remove duplicates from a list. +function! pathogen#uniq(list) abort " {{{1 + let i = 0 + let seen = {} + while i < len(a:list) + if (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i]) + call remove(a:list,i) + elseif a:list[i] ==# '' + let i += 1 + let empty = 1 + else + let seen[a:list[i]] = 1 + let i += 1 + endif + endwhile + return a:list +endfunction " }}}1 + +" \ on Windows unless shellslash is set, / everywhere else. +function! pathogen#separator() abort " {{{1 + return !exists("+shellslash") || &shellslash ? '/' : '\' +endfunction " }}}1 + +" Convenience wrapper around glob() which returns a list. +function! pathogen#glob(pattern) abort " {{{1 + let files = split(glob(a:pattern),"\n") + return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")') +endfunction "}}}1 + +" Like pathogen#glob(), only limit the results to directories. +function! pathogen#glob_directories(pattern) abort " {{{1 + return filter(pathogen#glob(a:pattern),'isdirectory(v:val)') +endfunction "}}}1 + +" Turn filetype detection off and back on again if it was already enabled. +function! pathogen#cycle_filetype() " {{{1 + if exists('g:did_load_filetypes') + filetype off + filetype on + endif +endfunction " }}}1 + +" Check if a bundle is disabled. A bundle is considered disabled if it ends +" in a tilde or its basename or full name is included in the list +" g:pathogen_disabled. +function! pathogen#is_disabled(path) " {{{1 + if a:path =~# '\~$' + return 1 + elseif !exists("g:pathogen_disabled") + return 0 + endif + let sep = pathogen#separator() + let blacklist = g:pathogen_disabled + return index(blacklist, strpart(a:path, strridx(a:path, sep)+1)) != -1 && index(blacklist, a:path) != 1 +endfunction "}}}1 + +" Prepend the given directory to the runtime path and append its corresponding +" after directory. If the directory is already included, move it to the +" outermost position. Wildcards are added as is. Ending a path in /{} causes +" all subdirectories to be added (except those in g:pathogen_disabled). +function! pathogen#surround(path) abort " {{{1 + let sep = pathogen#separator() + let rtp = pathogen#split(&rtp) + if a:path =~# '[\\/]{}$' + let path = fnamemodify(a:path[0:-4], ':p:s?[\\/]\=$??') + let before = filter(pathogen#glob_directories(path.sep.'*'), '!pathogen#is_disabled(v:val)') + let after = filter(reverse(pathogen#glob_directories(path.sep."*".sep."after")), '!pathogen#is_disabled(v:val[0:-7])') + call filter(rtp,'v:val[0:strlen(path)-1] !=# path') + else + let path = fnamemodify(a:path, ':p:s?[\\/]\=$??') + let before = [path] + let after = [path . sep . 'after'] + call filter(rtp, 'index(before + after, v:val) == -1') + endif + let &rtp = pathogen#join(before, rtp, after) + return &rtp +endfunction " }}}1 + +" Prepend all subdirectories of path to the rtp, and append all 'after' +" directories in those subdirectories. Deprecated. +function! pathogen#runtime_prepend_subdirectories(path) " {{{1 + call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#surround('.string(a:path.'/{}').')') + return pathogen#surround(a:path . pathogen#separator() . '{}') +endfunction " }}}1 + +" For each directory in the runtime path, add a second entry with the given +" argument appended. If the argument ends in '/{}', add a separate entry for +" each subdirectory. The default argument is 'bundle/{}', which means that +" .vim/bundle/*, $VIM/vimfiles/bundle/*, $VIMRUNTIME/bundle/*, +" $VIM/vim/files/bundle/*/after, and .vim/bundle/*/after will be added (on +" UNIX). +function! pathogen#incubate(...) abort " {{{1 + let sep = pathogen#separator() + let name = a:0 ? a:1 : 'bundle/{}' + if "\n".s:done_bundles =~# "\\M\n".name."\n" + return "" + endif + let s:done_bundles .= name . "\n" + let list = [] + for dir in pathogen#split(&rtp) + if dir =~# '\<after$' + if name =~# '{}$' + let list += filter(pathogen#glob_directories(substitute(dir,'after$',name[0:-3],'').'*'.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])') + [dir] + else + let list += [dir, substitute(dir, 'after$', '', '') . name . sep . 'after'] + endif + else + if name =~# '{}$' + let list += [dir] + filter(pathogen#glob_directories(dir.sep.name[0:-3].'*'), '!pathogen#is_disabled(v:val)') + else + let list += [dir . sep . name, dir] + endif + endif + endfor + let &rtp = pathogen#join(pathogen#uniq(list)) + return 1 +endfunction " }}}1 + +" Deprecated alias for pathogen#incubate(). +function! pathogen#runtime_append_all_bundles(...) abort " {{{1 + if a:0 + call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#incubate('.string(a:1.'/{}').')') + else + call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#incubate()') + endif + return call('pathogen#incubate', map(copy(a:000),'v:val . "/{}"')) +endfunction + +let s:done_bundles = '' +" }}}1 + +" Invoke :helptags on all non-$VIM doc directories in runtimepath. +function! pathogen#helptags() abort " {{{1 + let sep = pathogen#separator() + for glob in pathogen#split(&rtp) + for dir in split(glob(glob), "\n") + if (dir.sep)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir.sep.'doc') == 2 && !empty(filter(split(glob(dir.sep.'doc'.sep.'*'),"\n>"),'!isdirectory(v:val)')) && (!filereadable(dir.sep.'doc'.sep.'tags') || filewritable(dir.sep.'doc'.sep.'tags')) + silent! execute 'helptags' pathogen#fnameescape(dir.'/doc') + endif + endfor + endfor +endfunction " }}}1 + +command! -bar Helptags :call pathogen#helptags() + +" Execute the given command. This is basically a backdoor for --remote-expr. +function! pathogen#execute(...) abort " {{{1 + for command in a:000 + execute command + endfor + return '' +endfunction " }}}1 + +" Like findfile(), but hardcoded to use the runtimepath. +function! pathogen#runtime_findfile(file,count) abort "{{{1 + let rtp = pathogen#join(1,pathogen#split(&rtp)) + let file = findfile(a:file,rtp,a:count) + if file ==# '' + return '' + else + return fnamemodify(file,':p') + endif +endfunction " }}}1 + +" Backport of fnameescape(). +function! pathogen#fnameescape(string) abort " {{{1 + if exists('*fnameescape') + return fnameescape(a:string) + elseif a:string ==# '-' + return '\-' + else + return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','') + endif +endfunction " }}}1 + +if exists(':Vedit') + finish +endif + +let s:vopen_warning = 0 + +function! s:find(count,cmd,file,lcd) " {{{1 + let rtp = pathogen#join(1,pathogen#split(&runtimepath)) + let file = pathogen#runtime_findfile(a:file,a:count) + if file ==# '' + return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" + endif + if !s:vopen_warning + let s:vopen_warning = 1 + let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE' + else + let warning = '' + endif + if a:lcd + let path = file[0:-strlen(a:file)-2] + execute 'lcd `=path`' + return a:cmd.' '.pathogen#fnameescape(a:file) . warning + else + return a:cmd.' '.pathogen#fnameescape(file) . warning + endif +endfunction " }}}1 + +function! s:Findcomplete(A,L,P) " {{{1 + let sep = pathogen#separator() + let cheats = { + \'a': 'autoload', + \'d': 'doc', + \'f': 'ftplugin', + \'i': 'indent', + \'p': 'plugin', + \'s': 'syntax'} + if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) + let request = cheats[a:A[0]].a:A[1:-1] + else + let request = a:A + endif + let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' + let found = {} + for path in pathogen#split(&runtimepath) + let path = expand(path, ':p') + let matches = split(glob(path.sep.pattern),"\n") + call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') + call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') + for match in matches + let found[match] = 1 + endfor + endfor + return sort(keys(found)) +endfunction " }}}1 + +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(<count>,'edit<bang>',<q-args>,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(<count>,'edit<bang>',<q-args>,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(<count>,'edit<bang>',<q-args>,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(<count>,'split',<q-args>,<bang>1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(<count>,'vsplit',<q-args>,<bang>1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(<count>,'tabedit',<q-args>,<bang>1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(<count>,'pedit',<q-args>,<bang>1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(<count>,'read',<q-args>,<bang>1) + +" vim:set et sw=2:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/snippets/ruby.snip Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,108 @@ +# Ruby Snippets # + +snippet class +abbr class +options head + class ${1:name} + ${2} + end + +snippet mod +abbr module +options head + module ${1:name} + ${2} + end + +snippet defm +abbr def method_missing +options head + def method_missing(method, *args, &block) + ${1} + end + +snippet ea +abbr each do +options head + each do |${1:value}| + ${2} + end + +# ActiveRecord # + +snippet create_table +abbr create_table +options head + create_table :${1:name} do |t| + ${0} + t.timestamps + end + +# RSpec Snippets # + +snippet desc +abbr describe +options head + describe '${1:subject}' do + ${2} + end + +snippet cont +abbr context +options head + context '${1:context}' do + ${2} + end + +snippet bef +abbr before +options head + before :${1:each} do + ${2} + end + +snippet aft +abbr after +options head + after :${:each} + ${2} + end + +snippet let +abbr let +options head + let(:${1:object}) { ${2} } + +snippet subj +abbr subject +options head + subject { ${1} } + +snippet exp +abbr exp +options head + expect { ${1:expression} }.to ${2:expectance} + +snippet it +abbr it +options head + it '${1:spec}' do + ${2} + end + +snippet is +abbr it should +options head + it { should ${1} } + +snippet isn +abbr it should not +options head + it { should_not ${1} } + +snippet expt +abbr expect {} +options head + expect { + ${1:block} + }.to ${2}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/snippets/tex.snip Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,14 @@ +# Latex Snippets + +snippet subfigure +abbr subfigure +options head + \begin{subfigure}{0.5\textwidth} + \centering + \includegraphics[width=\textwidth]{${1:image}} + \end{subfigure} + +snippet SI +abbr SI +alias \SI si + $\SI{${1:value}}{${2:unit}}$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vimrc Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,336 @@ +set nocompatible +set laststatus=2 +set noshowmode + +execute pathogen#infect() + +set backspace=2 +set autowrite + +set vb +set guioptions-=r +set guioptions-=l +set guioptions-=R +set guioptions-=L + +syntax on +set expandtab +set number +set ruler +set nocursorline +set showmatch +set title +set wrap +set wrapmargin=2 +set linebreak +set lbr +set tabstop=2 shiftwidth=2 +color hybrid +set guifont=Inconsolata\ for\ Powerline:h12 +set autowrite +set hidden +set hlsearch +set incsearch +set ignorecase +set smartcase +set smartindent +set autoindent +set scrolloff=4 +set textwidth=80 + +set history=100 +set wildmenu + +set diffopt+=iwhite + +set formatoptions= +set formatoptions+=c " Format comments +set formatoptions+=r " Continue comments by default +set formatoptions+=o " Make comment when using o or O from comment line +set formatoptions+=q " Format comments with gq +set formatoptions+=n " Recognize numbered lists +set formatoptions+=2 " Use indent from 2nd line of a paragraph +set formatoptions+=l " Don't break lines that are already long +set formatoptions+=1 " Break before 1-letter words + +set splitright +set virtualedit=block +set conceallevel=0 + +set cryptmethod=blowfish + +filetype plugin indent on +autocmd FileType ruby set tabstop=2|set shiftwidth=2 + +set clipboard=unnamed + + +map <Leader>d :bp<bar>sp<bar>bn<bar>bd<CR> + +" See long lines as line breaks +map j gj +map k gk + +" remap tag-search to better place +nmap <C-$> <C-]> + +" Jump to end of line in insert mode +inoremap <C-e> <C-o>A + +" Jump one character in insert mode +inoremap <C-f> <C-o>l + +" Very Magic search patterns +nmap / /\v +cmap s/ s/\v + + +inoremap £ \ + +nnoremap <SPACE> <C-e> + +" Close Quickfix window (,qq) +map <leader>qq :cclose<CR> + +nnoremap <silent> n n:call HLNext(0.4)<cr> +nnoremap <silent> N N:call HLNext(0.4)<cr> + +function! HLNext (blinktime) + highlight WhiteOnRed ctermfg=white ctermbg=red guifg=white guibg=red + let [bufnum, lnum, col, off] = getpos('.') + let matchlen = strlen(matchstr(strpart(getline('.'),col-1),@/)) + let target_pat = '\c\%#'.@/ + let ring = matchadd('WhiteOnRed', target_pat, 101) + redraw + exec 'sleep ' . float2nr(a:blinktime * 1000) . 'm' + call matchdelete(ring) + redraw +endfunction + +" Swap v and CTRL-V +nnoremap v <C-V> +nnoremap <C-V> v + +vnoremap v <C-V> +vnoremap <C-V> v + +" Use backspace as delete in visual mode +vmap <BS> x + +" Keep selection when shifting +vmap <expr> > KeepVisualSelection(">") +vmap <expr> < KeepVisualSelection("<") + +function! KeepVisualSelection(cmd) + set nosmartindent + if mode() ==# "V" + return a:cmd . ":set smartindent\<CR>gv" + else + return a:cmd . ":set smartindent\<CR>" + endif +endfunction + +let g:indent_guides_auto_colors = 0 +let g:indent_guides_guide_size = 1 +highlight IndentGuidesEven guibg=background +highlight IndentGuidesOdd guibg='#282a2e' + +" Visual Block Dragging +vmap <expr> H DVB_Drag('left') +vmap <expr> L DVB_Drag('right') +vmap <expr> J DVB_Drag('down') +vmap <expr> K DVB_Drag('up') +vmap <expr> D DVB_Duplicate() +let g:DVB_TrimWS = 1 + +" Show trailing whitespaces +" exec "set listchars=tab:\uBB\uBB,trail:\uB7,nbsp:~" +" set list + +" Vim Math plugin; make simple calculations +vmap <expr> ++ VMATH_YankAndAnalyse() +nmap ++ vip++ + +" Airline configuration +let g:airline_inactive_collapse=0 +let g:airline_powerline_fonts=1 + +let g:airline_left_sep = '' +let g:airline_right_sep = '' + +let g:airline_theme = 'tomorrow' + +let g:airline#extensions#syntastic#enabled = 0 + +nnoremap <F5> :buffers<CR>:buffer<Space> +noremap <C-TAB> <C-w><C-w> + +" Set leader to , +let mapleader = "," + +" Custom key mappings + +let g:yankring_replace_n_pkey = 'cp' + +" Nerdtree +map <F2> :NERDTreeToggle<CR> +map <Leader>e :NERDTreeToggle<CR> +let NERDTreeIgnore = ['\.aux$', '\.log$', '\.out$'] + +" Vim - Rspec +map <leader>t :call RunCurrentSpecFile()<CR> +map <leader>s :call RunNearestSpec()<CR> +map <leader>l :call RunLastSpec()<CR> +map <leader>r :call RunAllSpecs()<CR> + +" Cucumber +map <leader>f :call RunAllFeatures()<CR> +map <leader>k :call RunCurrentFeature()<CR> + +" Autocomplete +inoremap <C-Space> <C-N> + +" Single char insertion +" nmap <Space> i_<Esc>r + +" Clear highlight +nnoremap <silent> <leader>n :nohlsearch<CR> + +" ctrl p - Fuzzy file finder +noremap <C-p> :CtrlP<CR> +let g:ctrl_map = '<c-p>' +let g:ctrl_cmd = 'CtrlP' + +map <C-l> :CtrlPBuffer<CR> +map <C-m> :CtrlPTag<CR> + +" ctrl p - Commands +map <leader>p :CtrlPCmdPalette<CR> + +" Markdown +let g:vim_markdown_folding_disabled=1 + +" tComment remap +nmap <leader>c <C-_><C-_> + +" Neo Complete +let g:acp_enableAtStartup=0 +let g:neocomplete#enable_at_startup=1 +let g:neocomplete#enable_smart_case=1 +let g:neocomplete#sources#syntax#min_keyword_length=3 +let g:neocomplete#lock_buffer_name_pattern = '\*ku\*' + +" Define dictionary. +let g:neocomplete#sources#dictionary#dictionaries = { + \ 'default' : '', + \ 'vimshell' : $HOME.'/.vimshell_hist', + \ 'scheme' : $HOME.'/.gosh_completions' + \ } +" Recommended key-mappings. +" <CR>: close popup and save indent. +inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR> +function! s:my_cr_function() + return neocomplete#close_popup() . "\<CR>" + " For no inserting <CR> key. + "return pumvisible() ? neocomplete#close_popup() : "\<CR>" +endfunction +" <TAB>: completion. +inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" +" <C-h>, <BS>: close popup and delete backword char. +inoremap <expr><C-h> neocomplete#smart_close_popup()."\<C-h>" + +autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS +autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags +autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS +autocmd FileType python setlocal omnifunc=pythoncomplete#Complete +autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags +autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete + if !exists('g:neocomplete#sources#omni#input_patterns') + let g:neocomplete#sources#omni#input_patterns = {} + endif + +" Neo Snippets +imap <C-k> <Plug>(neosnippet_expand_or_jump) +smap <C-k> <Plug>(neosnippet_expand_or_jump) +xmap <C-k> <Plug>(neosnippet_expand_target) + +imap <expr><TAB> neosnippet#expandable_or_jumpable() ? + \ "\<Plug>(neosnippet_expand_or_jump)" + \: pumvisible() ? "\<C-n>" : "\<TAB>" +smap <expr><TAB> neosnippet#expandable_or_jumpable() ? + \ "\<Plug>(neosnippet_expand_or_jump)" + \: "\<TAB>" +let g:neocomplete#sources#omni#input_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::' + +let g:neosnippet#snippets_directory='~/.vim/snippets' + +" Tabular +inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a + +function! s:align() + let p = '^\s*|\s.*\s|\s*$' + if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p) + let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g')) + let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*')) + Tabularize/|/l1 + normal! 0 + call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.')) + endif +endfunction + +" Align Migration files +vmap <c-a> :Tabularize /:/l1l0l0<CR> + +nmap <Leader>a= :Tabularize /=<CR> +vmap <Leader>a= :Tabularize /=<CR> +nmap <Leader>a=> :Tabularize /=><CR> +vmap <Leader>a=> :Tabularize /=><CR> +nmap <Leader>a: :Tabularize /:\zs/l0l1<CR> +vmap <Leader>a: :Tabularize /:\zs/l0l1<CR> +nmap <Leader>a, :Tabularize /,\zs/l0l1<CR> +vmap <Leader>a, :Tabularize /,\zs/l0l1<CR> +vmap <Leader>a- :Tabularize /-<CR> + + + +augroup markdown + au! + au BufNewFile,BufRead *.md,*.markdown setlocal filetype=ghmarkdown +augroup END + + +" Latex plugin +au BufNewFile,BufRead,BufEnter *.tex setlocal spell spelllang=en_gb +au BufNewFile,BufRead,BufEnter *.tex setlocal textwidth=0 +au BufNewFile,BufRead,BufEnter *.txt setlocal spell spelllang=en_gb +au BufNewFile,BufRead,BufEnter *.txt setlocal textwidth=0 + +let g:tex_conseal = "" + +let g:tex_comment_nospell=1 +let g:Tex_DefaultTargetFormat = 'pdf' +let g:tex_flavor = 'latex' +let g:Tex_TreatMacViewerAsUNIX = 1 +let g:Tex_ExecuterUNIXViewerInForeground = 1 +let g:Tex_ViewRule_pdf = 'open -a Preview' +let g:Tex_ViewRule_ps = 'open -a Preview' + +" Tagbar mapping +nmap <F8> :TagbarToggle<CR> + +" The silver searcher +" let g:ackprg = 'ag --nogroup --nocolor --column' + +" Multiple cursor insert +let g:multi_cursor_next_key='<C-n>' +let g:multi_cursor_prev_key='<C-m>' +let g:multi_cursor_skip_key='<C-x>' +let g:multi_cursor_quit_key='<Esc>' + +" Gundo tree +nnoremap <leader>u :GundoToggle<CR> + +" Yank ring +nnoremap <silent> <leader>y :YRShow<CR> + +let g:livepreview_previewer = 'open -a Preview'
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zshrc Sun Feb 23 17:20:32 2014 +0100 @@ -0,0 +1,87 @@ +# 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="custom" + +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" + +# Set to this to use case-sensitive completion +# CASE_SENSITIVE="true" + +# Comment this out to disable bi-weekly auto-update checks +# DISABLE_AUTO_UPDATE="true" + +# Uncomment to change how many often would you like to wait before auto-updates occur? (in days) +# export UPDATE_ZSH_DAYS=13 + +# 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/*) +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +plugins=(git z textmate sublime ruby history-substring-search brew gitfast osx terminalapp tmuxinator vagrant web-search) + +source $ZSH/oh-my-zsh.sh + +# source $ZSH/plugins/history-substring-search/history-substring-search.zsh + +# Customize to your needs... +export PATH=$PATH:/usr/local/opt/ruby/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/usr/local/sbin +export PATH="/usr/local/bin:$PATH" +export PATH="$(brew --prefix ruby)/bin:$PATH" +export NODE_PATH="/usr/local/lib/node" +export PATH="/usr/local/share/npm/bin:$PATH" +export PATH="$HOME/.tmuxifier/bin:$PATH" +eval "$(rbenv init -)" +eval "$(tmuxifier init -)" + + +export GNUTERM=X11 +export SVN_EDITOR=vim + +export CLICOLOR=1 +export LSCOLORS=GxFxCxDxBxegedabagaced + +export EDITOR='vim' + +export GREP_COLOR=32 + +export TMUXIFIER_LAYOUT_PATH="$HOME/.tmux-layouts" + +# Shortcuts +alias blade="cd \"/Volumes/Blade 32GB/\"" +alias p="~/Documents/projects" + +# Commands +alias grep="grep --color=auto" +alias beer="bundle exec rake" +alias ll="ls -al" +alias mux="tmuxifier" + +# Functions +gcat () { + cat $1 | egrep "$2|$" +} + +# alias ctags='$(brew --prefix ctags)/bin/ctags' + +# Disable Autocorrections +alias tmux='nocorrect tmux' +alias mvim="reattach-to-user-namespace mvim" +alias vim="reattach-to-user-namespace vim" +alias ag="ag --color" +# Syntax Highlighting +# source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh