bunch of random updates/improvements

- filter out log/tmp directories from grep searches
- add ruby doc searching
This commit is contained in:
Michael Campagnaro 2012-11-15 13:05:57 -05:00
parent 07456e7b02
commit 4fa1a0959e
5 changed files with 33 additions and 5 deletions

3
.gitmodules vendored
View File

@ -10,3 +10,6 @@
[submodule ".vim/bundle/cctrlp.vim"]
path = .vim/bundle/cctrlp.vim
url = https://github.com/kien/ctrlp.vim.git
[submodule ".vim/bundle/vim-monokai"]
path = .vim/bundle/vim-monokai
url = git://github.com/sickill/vim-monokai.git

@ -0,0 +1 @@
Subproject commit 496ac9039f016fda75d7787a28abfba5481f7347

21
.vimrc
View File

@ -8,9 +8,6 @@ call pathogen#helptags()
set runtimepath^=~/.vim/bundle/ctrlp.vim
map <leader>gR :call ShowRoutes()<cr>
map <leader>gv :CtrlP app/views<cr>
" Command-T Config
map <leader>gv :CtrlP app/views<cr>
map <leader>gc :CtrlP app/controllers<cr>
map <leader>gm :CtrlP app/models<cr>
map <leader>gh :CtrlP app/helpers<cr>
@ -73,6 +70,7 @@ filetype plugin indent on
set wildmode=longest,list
" make tab completion for files/buffers act like bash
set wildmenu
colorscheme Monokai
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" CUSTOM AUTOCMDS
@ -150,14 +148,29 @@ function! RenameFile()
endfunction
map <leader>n :call RenameFile()<cr>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" GREP SEARCH
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! Search()
let term = input('Grep search term: ')
if term != ''
exec '!grep ' . term . ' .'
exec '!grep "' . term . '" .'
endif
endfunction
map <leader>s :call Search()<cr>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" RUBY DOC SEARCH
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! RubyDocSearch()
let term = input('Ruby Doc search term: ')
if term != ''
exec '!ri ' . term
endif
endfunction
map <leader>d :call RubyDocSearch()<cr>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PROMOTE VARIABLE TO RSPEC LET
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

3
.zshrc
View File

@ -31,7 +31,7 @@ alias ls='ls -G'
alias ll='ls -lG'
alias l='ls -laG'
alias duh='du -csh'
export GREP_OPTIONS="-nr --color"
export GREP_OPTIONS="-nRi --color --exclude-dir=tmp --exclude-dir=log"
# Unbreak history
export HISTSIZE=10000
@ -44,6 +44,7 @@ alias g=git
alias gco='git co'
alias gst='git st'
alias gci='git ci'
alias gpff='git pullff'
alias gp='git push'
alias gpom='git push origin master'
alias gf='git fetch'

10
setup_notes.txt Normal file
View File

@ -0,0 +1,10 @@
Setting up Ruby
---------------
* Install rvm
* Install bundler
* Install Ruby Docs
gem install rdoc-data
rdoc-data --install
# to regenerate all gem docs
gem rdoc --all --overwrite