Skip to content

Instantly share code, notes, and snippets.

@christianrojas
Last active August 29, 2015 14:05
Show Gist options
  • Save christianrojas/4284cdb413d898954e77 to your computer and use it in GitHub Desktop.
Save christianrojas/4284cdb413d898954e77 to your computer and use it in GitHub Desktop.
vimrc
# grc overides for ls
# Made possible through contributions from generous benefactors like
# `brew install coreutils`
if $(gls &>/dev/null)
then
alias ls="gls -F --color"
alias l="gls -lAh --color"
alias ll="gls -l --color"
alias la="gls -A --color"
fi
# Bundler
alias b="bundle"
# Tests and Specs
alias t="ruby -I test"
# Rails
alias migrate="rake db:migrate db:rollback && rake db:migrate"
alias m="migrate"
alias rk="rake"
alias s="rspec"
# Dev Apps
alias carmary='cd /Users/christian/Dropbox/code/work/carmary/carmary'
alias broka='cd /Users/christian/Dropbox/code/work/personal/broka-app'
alias icc='cd /Users/christian/Dropbox/code/work/personal/icc-app'
alias c-bulz='/Users/christian/Dropbox/code/work/tangoSource/c-bullz'
# Git - Github
alias g='git status'
alias gch='git checkout '
alias gd='git diff '
alias gc='git commit'
if &compatible
set nocompatible
end
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Let Vundle manage Vundle
Plugin 'gmarik/Vundle.vim'
" Define bundles via Github repos
" Plugin 'morhetz/gruvbox'
Plugin 'christoomey/vim-run-interactive'
Plugin 'croaky/vim-colors-github'
" Plugin 'danro/rename.vim'
Plugin 'terryma/vim-multiple-cursors'
" Plugin 'kchmck/vim-coffee-script'
" Plugin 'kien/ctrlp.vim'
" Plugin 'pbrisbin/vim-mkdir'
" Plugin 'scrooloose/syntastic'
" Plugin 'slim-template/vim-slim'
" Plugin 'thoughtbot/vim-rspec'
" Plugin 'tpope/vim-bundler'
" Plugin 'tpope/vim-endwise'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-rails'
" Plugin 'tpope/vim-surround'
Plugin 'vim-ruby/vim-ruby'
" Plugin 'vim-scripts/ctags.vim'
Plugin 'vim-scripts/matchit.zip'
Plugin 'vim-scripts/tComment'
Plugin 'scrooloose/nerdtree'
Plugin 'fatih/vim-go'
Plugin 'tpope/vim-haml'
" Plugin 'bling/vim-airline'
Plugin 'Lokaltog/powerline'
Bundle 'skalnik/vim-vroom'
call vundle#end()
filetype plugin indent on
if filereadable(expand("~/.vimrc.bundles.local"))
source ~/.vimrc.bundles.local
endif
filetype on
" Use Vim settings, rather then Vi settings. This setting must be as early as
" possible, as it has side effects.
set nocompatible
" Leader
let mapleader = " "
set backspace=2 " Backspace deletes like most programs in insert mode
set nobackup
set nowritebackup
set noswapfile " http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287
set history=50
"set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
"set laststatus=2 " Always display the status line
set autowrite " Automatically :write before running commands
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on")
syntax on
endif
if filereadable(expand("~/.vimrc.bundles"))
source ~/.vimrc.bundles
endif
filetype plugin indent on
" Softtabs, 2 spaces
set tabstop=2
set shiftwidth=2
set shiftround
set expandtab
" Display extra whitespace
set list listchars=tab:»·,trail:-
" Color scheme
colorscheme github
highlight NonText guibg=#060606
highlight Folded guibg=#0A0A0A guifg=#9090D0
" Make it obvious where 80 characters is
set textwidth=80
" set colorcolumn=+1
" Numbers
set number
set numberwidth=5
augroup vimrcEx
autocmd!
" When editing a file, always jump to the last known cursor position.
" Don't do it for commit messages, when the position is invalid, or when
" inside an event handler (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
" Cucumber navigation commands
autocmd User Rails Rnavcommand step features/step_definitions -glob=**/* -suffix=_steps.rb
autocmd User Rails Rnavcommand config config -glob=**/* -suffix=.rb -default=routes
" Set syntax highlighting for specific file types
autocmd BufRead,BufNewFile Appraisals set filetype=ruby
autocmd BufRead,BufNewFile *.md set filetype=markdown
" Enable spellchecking for Markdown
autocmd FileType markdown setlocal spell
" Automatically wrap at 80 characters for Markdown
autocmd BufRead,BufNewFile *.md setlocal textwidth=80
augroup END
" Add this to your vimrc to provide a shortcut
nnoremap <leader>ri :RunInInteractiveShell<space>
" Edit the README_FOR_APP (makes :R commands work)
map <Leader>R :e README.md<CR>
" Leader shortcuts for Rails commands
map <Leader>m :Rmodel
map <Leader>c :Rcontroller
map <Leader>v :Rview
map <Leader>u :Runittest
map <Leader>f :Rfunctionaltest
map <Leader>tm :RTmodel
map <Leader>tc :RTcontroller
map <Leader>tv :RTview
map <Leader>tu :RTunittest
map <Leader>tf :RTfunctionaltest
map <Leader>sm :RSmodel
map <Leader>sc :RScontroller
map <Leader>sv :RSview
map <Leader>su :RSunittest
map <Leader>sf :RSfunctionaltest
" Hide search highlighting
map <Leader>h :set invhls <CR>
map <Leader>c "+y
map <Leader>p "+p
map <Leader>g :Gstatus
map <Leader>gc :Gcommit
if &compatible
set nocompatible
end
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Let Vundle manage Vundle
Plugin 'gmarik/Vundle.vim'
" Define bundles via Github repos
" Plugin 'morhetz/gruvbox'
Plugin 'christoomey/vim-run-interactive'
Plugin 'croaky/vim-colors-github'
" Plugin 'danro/rename.vim'
Plugin 'terryma/vim-multiple-cursors'
" Plugin 'kchmck/vim-coffee-script'
" Plugin 'kien/ctrlp.vim'
" Plugin 'pbrisbin/vim-mkdir'
" Plugin 'scrooloose/syntastic'
" Plugin 'slim-template/vim-slim'
" Plugin 'thoughtbot/vim-rspec'
" Plugin 'tpope/vim-bundler'
" Plugin 'tpope/vim-endwise'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-rails'
" Plugin 'tpope/vim-surround'
Plugin 'vim-ruby/vim-ruby'
" Plugin 'vim-scripts/ctags.vim'
Plugin 'vim-scripts/matchit.zip'
Plugin 'vim-scripts/tComment'
Plugin 'scrooloose/nerdtree'
Plugin 'fatih/vim-go'
Plugin 'tpope/vim-haml'
" Plugin 'bling/vim-airline'
Plugin 'Lokaltog/powerline'
Bundle 'skalnik/vim-vroom'
call vundle#end()
filetype plugin indent on
if filereadable(expand("~/.vimrc.bundles.local"))
source ~/.vimrc.bundles.local
endif
filetype on
# 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="robbyrussell"
# 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 enable command auto-correction.
# ENABLE_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)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
source $ZSH/oh-my-zsh.sh
# User configuration
# export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/Ghostscript/bin:/usr/local/git/bin:/usr/local/go/bin:/opt/ImageMagick/bin:/Users/christian/.rvm/bin"
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/Users/christian/.rvm/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"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# aliases
[[ -f ~/.aliases ]] && source ~/.aliases
# handy keybindings
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
bindkey "^R" history-incremental-search-backward
bindkey "^P" history-search-backward
bindkey "^Y" accept-and-hold
bindkey "^N" insert-last-word
bindkey -s "^T" "^[Isudo ^[A" # "t" for "toughguy"
# use vim as the visual editor
export VISUAL=vim
export EDITOR=$VISUAL
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
export MAILER_USERNAME=testdevcarg@gmail.com
export MAILER_PASSWORD=ev4da3heed3um6in
export MAILER_HOST=localhost:3000
export DEPLOYER_PASSWORD=ef4el9ant3youv7gib3beesn4ek3its8ef4vub4cuerd8oj3ha
#Go Setup
export GOPATH=$HOME/goapps
#export PATH=$GOPATH/bin:$PATH
export PATH=$PATH:/usr/local/go/bin:$GOPATH
export PATH=$PATH:$HOME/goapps/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment