Skip to content

Instantly share code, notes, and snippets.

@DanBradbury
Last active August 29, 2015 14:04
Show Gist options
  • Save DanBradbury/4138a78afafb740a2821 to your computer and use it in GitHub Desktop.
Save DanBradbury/4138a78afafb740a2821 to your computer and use it in GitHub Desktop.
My Dotfiles
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"
" " let Vundle manage Vundle, required
Plugin 'gmarik/vundle'
Plugin 'lsdr/monokai'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'altercation/vim-colors-solarized'
Plugin 'bronson/vim-trailing-whitespace'
Plugin 'chikamichi/mediawiki.vim'
Plugin 'chrisbra/csv.vim'
Plugin 'ekalinin/Dockerfile.vim'
Plugin 'godlygeek/tabular'
Plugin 'honza/vim-snippets'
Plugin 'kchmck/vim-coffee-script'
Plugin 'kien/ctrlp.vim'
Plugin 'majutsushi/tagbar'
Plugin 'mattn/gist-vim'
Plugin 'mattn/webapi-vim'
Plugin 'mileszs/ack.vim'
Plugin 'mmalecki/vim-node.js'
Plugin 'othree/html5.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'rking/ag.vim'
Plugin 'saltstack/salt-vim'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/syntastic'
Plugin 'sjl/gundo.vim'
Plugin 'slim-template/vim-slim'
Plugin 'tomasr/molokai'
Plugin 'tpope/vim-abolish'
Plugin 'tpope/vim-endwise'
Plugin 'tpope/vim-eunuch'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-git'
Plugin 'tpope/vim-haml'
Plugin 'tpope/vim-markdown'
Plugin 'tpope/vim-pastie'
Plugin 'tpope/vim-pathogen'
Plugin 'tpope/vim-ragtag'
Plugin 'tpope/vim-rails'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-speeddating'
Plugin 'tpope/vim-unimpaired'
Plugin 'tpope/vim-vividchalk'
Plugin 'vim-ruby/vim-ruby'
Plugin 'vim-scripts/apachelogs.vim'
Plugin 'vim-scripts/apachestyle'
Plugin 'vim-scripts/bats.vim'
Plugin 'vim-scripts/dhcpd.vim'
Plugin 'vim-scripts/fontzoom.vim'
Plugin 'vim-scripts/iptables'
Plugin 'vim-scripts/nginx.vim'
Plugin 'jaxbot/semantic-highlight.vim'
Plugin 'mattn/flappyvird-vim'
Plugin 'junegunn/goyo.vim'
Plugin 'junegunn/limelight.vim'
"text formatting options"
au! FileType haml set noet
" " git repos on your local machine (i.e. when working on your own plugin)
" Plugin 'file:///home/gmarik/path/to/plugin'
" " The sparkup vim script is in a subdirectory of this repo called vim.
" " Pass the path to set the runtimepath properly.
" Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" " Avoid a name conflict with L9
" Plugin 'user/L9', {'name': 'newL9'}
"
" " All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" " To ignore plugin indent changes, instead use:
filetype plugin on
" " Put your non-Plugin stuff after this line
set hidden " don't unload buffer when switching away
set modeline " allow per-file settings via modeline
set exrc " enable per-directory .vimrc files
set secure " disable unsafe commands in local .vimrc files
set encoding=utf-8 fileencoding=utf-8 termencoding=utf-8 " saving and encoding
set nobackup nowritebackup noswapfile autoread " no backup or swap
set hlsearch incsearch ignorecase smartcase " search
set wildmenu " completion
set backspace=indent,eol,start " sane backspace
" set clipboard=unnamedplus " use the system clipboard for yank/put/delete
set mouse=a " enable mouse for all modes settings
set nomousehide " don't hide the mouse cursor while typing
set mousemodel=popup " right-click pops up context menu
set ruler " show cursor position in status bar
" set relativenumber " show relative line numbers
set number " show absolute line number of the current line
set nofoldenable " I fucking hate code folding
set scrolloff=10 " scroll the window so we can always see 10 lines around the cursor
set textwidth=80 " show a vertical line at the 79th character
set cursorline " highlight the current line
set cursorcolumn " highlight the current line
set printoptions=paper:letter " use letter as the print output format
set guioptions-=T " turn off GUI toolbar (icons)
set guioptions-=r " turn off GUI right scrollbar
set guioptions-=L " turn off GUI left scrollbar
set winaltkeys=no " turn off stupid fucking alt shortcuts
set laststatus=2 " always show status bar
" check the parent directories for tags, too.
set tags+=./tags,../tags,../../tags,../../../tags,../../../../tags
set tags+=../../../../../tags,../../../../../../tags,../../../../../../../tags
set tags+=../../../../../../../../tags,../../../../../../../../../tags
" middle-click paste
map! <S-Insert> <MiddleMouse>
" appearance
syntax on
set background=light
colorscheme solarized
set t_Co=256 " 256 colors in terminal
"if has('gui_gnome')
" set guifont=Ubuntu\ Mono\ 8.4
"endif
"" Molokai theme
" highlight the 80th column
"
" In Vim >= 7.3, also highlight columns 120+
"if exists('+colorcolumn')
" (I picked 120-320 because you have to provide an upper bound and 320 just
" covers a 1080p GVim window in Ubuntu Mono 11 font.)
" let &colorcolumn="80,".join(range(120,320),",")
"else
" fallback for Vim < v7.3
" autocmd BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1)
"endif
" formatting
filetype plugin indent on
set shiftwidth=2 tabstop=2 softtabstop=2 expandtab autoindent
autocmd filetype c,asm,python setlocal shiftwidth=4 tabstop=4 softtabstop=4
" Makefile no expandtab
autocmd FileType make setlocal noexpandtab
" " Color name (:help gui-colors) or RGB color
let g:limelight_conceal_guifg = 'DarkGray'
let g:limelight_conceal_guifg = '#777777'
"
" " Default: 0.5
let g:limelight_default_coefficient = 0.7
" bindings to:
" - cd current window to parent directory of file
" - generate ctags
" - flush command-t index
" - better range
" - fix white space
" - rerun previous :command
" - underline a line with equals (h1 in Markdown documents)
" - underline a line with hyphens (h2 in Markdown documents)
" - sort selection
noremap <Leader>cd :lcd %:h<CR>:pwd<CR>
noremap <Leader>ct :!ctags -R .<CR><CR>
noremap <Leader>cf :CommandTFlush<CR>
noremap <Leader>bd :1,999bd<CR>:NERDTree<CR>:NERDTree<CR>
noremap ' `
map <Leader>W :FixWhitespace<CR>
"map <Leader>] @:
map <Leader>= yypVr=
map <Leader>- yypVr-
map <Leader>s :sort<CR>
map <Leader>R :!ruby -I"test:lib" "%"
map <Leader>x 500x
map <Leader>h 500h
map <Leader>s :SemanticHighlight<CR>
map <Leader>t :CtrlP<CR>
map <Leader>fi :Goyo<CR>
map <Leader>fo :Goyo!<CR>
map <Leader>[ gT
map <Leader>] gt
" das MVC
noremap <Leader>gm :Emodel<CR>
noremap <Leader>gv :Eview<CR>
noremap <Leader>gc :Econtroller<CR>
noremap <Leader>bd :set bg=dark<CR>
noremap <Leader>bl :set bg=light<CR>
" move between windows with M-hjkl (urxvt then gvim)
noremap <Esc>h <C-w>h
noremap <Esc>j <C-w>j
noremap <Esc>k <C-w>k
noremap <Esc>l <C-w>l
" create windows with ease
" resize windows with ease
" return to previously open window
"map <Leader>] :e#
"noremap <D-h> <C-w>h
noremap <D-j> 20j
noremap <D-k> 20k
"noremap <D-l> <C-w>l
" jump 5 lines with C-jk
noremap <C-j> 5j
noremap <C-k> 5k
noremap <C-l> 10l
noremap <C-h> 10h
" NERDTree
let NERDTreeWinPos='right'
map <C-Bslash> :NERDTreeToggle<CR>
" Tagbar
nmap <Leader>rt :TagbarToggle<CR>
" Ack
nmap <Leader>f :Ack<Space>
" Tabular
nmap <Leader>T :Tabularize<CR>
" Limelight usage
nmap <Leader>li :Limelight0.3<CR>
nmap <Leader>lo :Limelight!<CR>
# Path to your oh-my-zsh installation.
export 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="afowler"
#ZSH_THEME='demonicdan'
#ALIAS list
alias st="open /Applications/SourceTree.app"
alias slt="open /Applications/Sublime\ Text\ 2.app/"
alias rt="ruby -I\"test:lib\" "
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to disable command auto-correction.
# DISABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# 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)
source $ZSH/oh-my-zsh.sh
# User configuration
export PATH="/usr/local/bin/rbenv:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/mysql/bin"
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
#export PATH=/usr/local/Cellar/ruby/2.1.2/bin:$PATH
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
### 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