fixed up ctrl-p commands and added other useful things
This commit is contained in:
parent
4fa1a0959e
commit
76984075b8
47
.vimrc
47
.vimrc
|
@ -6,18 +6,20 @@ call pathogen#helptags()
|
||||||
|
|
||||||
" ctrlp.vim Config
|
" ctrlp.vim Config
|
||||||
set runtimepath^=~/.vim/bundle/ctrlp.vim
|
set runtimepath^=~/.vim/bundle/ctrlp.vim
|
||||||
map <leader>gR :call ShowRoutes()<cr>
|
let g:ctrlp_map = '<leader>ff'
|
||||||
map <leader>gv :CtrlP app/views<cr>
|
let g:ctrlp_cmd = 'CtrlP'
|
||||||
map <leader>gc :CtrlP app/controllers<cr>
|
|
||||||
map <leader>gm :CtrlP app/models<cr>
|
map <leader>fR :call ShowRoutes()<cr>
|
||||||
map <leader>gh :CtrlP app/helpers<cr>
|
nmap <leader>fv :CtrlP app/views<cr>
|
||||||
map <leader>gl :CtrlP<cr> lib<cr>
|
nmap <leader>fc :CtrlP app/controllers<cr>
|
||||||
map <leader>gp :CtrlP public<cr>
|
nmap <leader>fm :CtrlP app/models<cr>
|
||||||
map <leader>gs :CtrlP public/stylesheets/sass<cr>
|
map <leader>fh :CtrlP app/helpers<cr>
|
||||||
map <leader>gf :CtrlP features<cr>
|
map <leader>fl :CtrlP<cr> lib<cr>
|
||||||
|
map <leader>fp :CtrlP public<cr>
|
||||||
|
map <leader>fs :CtrlP app/views/stylesheets<cr>
|
||||||
map <leader>gg :topleft 100 :split Gemfile<cr>
|
map <leader>gg :topleft 100 :split Gemfile<cr>
|
||||||
map <leader>f :CtrlP<cr>
|
|
||||||
map <leader>F :CtrlP %%<cr>
|
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" BASIC EDITING CONFIGURATION
|
" BASIC EDITING CONFIGURATION
|
||||||
|
@ -68,9 +70,8 @@ syntax on
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
" use emacs-style tab completion when selecting files, etc
|
" use emacs-style tab completion when selecting files, etc
|
||||||
set wildmode=longest,list
|
set wildmode=longest,list
|
||||||
" make tab completion for files/buffers act like bash
|
|
||||||
set wildmenu
|
|
||||||
colorscheme Monokai
|
colorscheme Monokai
|
||||||
|
set wildignore+=*/tmp/*,*/log/*,*.so,*.swp,*.zip
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" CUSTOM AUTOCMDS
|
" CUSTOM AUTOCMDS
|
||||||
|
@ -108,6 +109,23 @@ imap <c-l> <space>=><space>
|
||||||
" set esc to <c-c>
|
" set esc to <c-c>
|
||||||
imap <c-c> <esc>
|
imap <c-c> <esc>
|
||||||
|
|
||||||
|
" remap semicovlon
|
||||||
|
nmap <leader>. :
|
||||||
|
|
||||||
|
" Quickly edit/reload the vimrc file
|
||||||
|
nmap <silent> <leader>ev :e $MYVIMRC<cr>
|
||||||
|
nmap <silent> <leader>rv :so $MYVIMRC<cr>
|
||||||
|
|
||||||
|
" remap saving and quiting :P
|
||||||
|
nmap <leader>w :w<cr>
|
||||||
|
nmap <leader>q :q<cr>
|
||||||
|
nmap <leader>Q :q!<cr>
|
||||||
|
nmap <leader>x :x<cr>
|
||||||
|
:ca WQ wq
|
||||||
|
:ca Wq wq
|
||||||
|
:ca W w
|
||||||
|
:ca Q q
|
||||||
|
|
||||||
" Clear the search buffer (highlighting) when hitting return
|
" Clear the search buffer (highlighting) when hitting return
|
||||||
function! MapCR()
|
function! MapCR()
|
||||||
nnoremap <cr> :nohlsearch<cr>
|
nnoremap <cr> :nohlsearch<cr>
|
||||||
|
@ -233,7 +251,7 @@ function! AlternateForCurrentFile()
|
||||||
endif
|
endif
|
||||||
return new_file
|
return new_file
|
||||||
endfunction
|
endfunction
|
||||||
nnoremap <leader>. :call OpenTestAlternate()<cr>
|
nnoremap <leader>o :call OpenTestAlternate()<cr>
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" RUNNING TESTS
|
" RUNNING TESTS
|
||||||
|
@ -242,7 +260,6 @@ map <leader>t :call RunTestFile()<cr>
|
||||||
map <leader>T :call RunNearestTest()<cr>
|
map <leader>T :call RunNearestTest()<cr>
|
||||||
map <leader>a :call RunTests('')<cr>
|
map <leader>a :call RunTests('')<cr>
|
||||||
map <leader>c :w\|:!script/features<cr>
|
map <leader>c :w\|:!script/features<cr>
|
||||||
map <leader>w :w\|:!script/features --profile wip<cr>
|
|
||||||
|
|
||||||
function! RunTestFile(...)
|
function! RunTestFile(...)
|
||||||
if a:0
|
if a:0
|
||||||
|
|
8
.zshrc
8
.zshrc
|
@ -54,8 +54,8 @@ alias gdc='git diff --cached'
|
||||||
alias gam='git commit --amend'
|
alias gam='git commit --amend'
|
||||||
alias gre='git remote'
|
alias gre='git remote'
|
||||||
alias cls=clear
|
alias cls=clear
|
||||||
alias sl=ls # often screw this up
|
|
||||||
alias history='fc -l 1'
|
alias history='fc -l 1'
|
||||||
|
alias cd-='cd -'
|
||||||
alias ..='cd ../'
|
alias ..='cd ../'
|
||||||
alias ...='cd ../..'
|
alias ...='cd ../..'
|
||||||
alias cd..='cd ..'
|
alias cd..='cd ..'
|
||||||
|
@ -63,7 +63,8 @@ alias cd...='cd ../..'
|
||||||
alias cd....='cd ../../..'
|
alias cd....='cd ../../..'
|
||||||
alias cd.....='cd ../../../..'
|
alias cd.....='cd ../../../..'
|
||||||
alias cd/='cd /'
|
alias cd/='cd /'
|
||||||
|
# easier reload
|
||||||
|
alias reload='source ~/.zshrc'
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
activate_virtualenv() {
|
activate_virtualenv() {
|
||||||
|
@ -75,3 +76,6 @@ activate_virtualenv() {
|
||||||
}
|
}
|
||||||
|
|
||||||
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
|
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
|
||||||
|
|
||||||
|
### Added by the Heroku Toolbelt
|
||||||
|
export PATH="/usr/local/heroku/bin:$PATH"
|
||||||
|
|
|
@ -8,3 +8,7 @@ Setting up Ruby
|
||||||
rdoc-data --install
|
rdoc-data --install
|
||||||
# to regenerate all gem docs
|
# to regenerate all gem docs
|
||||||
gem rdoc --all --overwrite
|
gem rdoc --all --overwrite
|
||||||
|
|
||||||
|
Setup Vim
|
||||||
|
---------
|
||||||
|
Map <CapsLock> to <Ctrl> in System Preferences -> Keyboard -> Modifier Keys. Now <caps-c> can leave insert mode.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user