tweaks! aliases! shiiiiite

This commit is contained in:
2013-07-16 19:36:06 -04:00
parent 097a97ded2
commit 97f6fe7123
5 changed files with 18 additions and 22 deletions

22
vimrc
View File

@@ -178,6 +178,7 @@ map <leader>m :vsplit<cr>
map <leader>mm :split<cr>
map <leader>gg :topleft 100 :split Gemfile<cr>
map <leader>gr :topleft 100 :split config/routes.rb<cr>
" Clear the search buffer (highlighting) when hitting return
function! MapCR()
@@ -243,27 +244,6 @@ endfunction
:command! PromoteToLet :call PromoteToLet()
:map <leader>pp :PromoteToLet<cr>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" MAPS TO JUMP TO SPECIFIC COMMAND-T TARGETS AND FILES
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <leader>gr :topleft :split config/routes.rb<cr>
function! ShowRoutes()
" Requires 'scratch' plugin
:topleft 100 :split __Routes__
" Make sure Vim doesn't write __Routes__ as a file
:set buftype=nofile
" Delete everything
:normal 1GdG
" Put routes output in buffer
:0r! rake -s routes
" Size window to number of lines (1 plus rake output length)
:exec ":normal " . line("$") . _ "
" Move cursor to bottom
:normal 1GG
" Delete empty trailing line
:normal dd
endfunction
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" SWITCH BETWEEN TEST AND PRODUCTION CODE
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""