Skip to content
Browse files

Add vim-ruby, vim-surround, and a handy function for opening jasmine …

…specs.
  • Loading branch information...
1 parent 4b64ed1 commit d0245187af5649aeeb0b1c8e7d62772d59b7b05d @r00k committed Mar 28, 2012
Showing with 14 additions and 0 deletions.
  1. +1 −0 vim/bundle/vim-ruby
  2. +1 −0 vim/bundle/vim-surround
  3. +12 −0 vimrc
1 vim/bundle/vim-ruby
@@ -0,0 +1 @@
+Subproject commit 3d43f02a4825daeba860e089d6cd65d505eb1245
1 vim/bundle/vim-surround
@@ -0,0 +1 @@
+Subproject commit 489a1e8c676ad47dd358dbf883bfaf492148d38b
View
12 vimrc
@@ -17,7 +17,9 @@ Bundle 'kchmck/vim-coffee-script'
Bundle 'tomtom/tcomment_vim'
Bundle 'tpope/vim-cucumber'
Bundle 'tpope/vim-fugitive'
+Bundle 'tpope/vim-surround'
Bundle 'tpope/vim-rails'
+Bundle 'vim-ruby/vim-ruby'
Bundle 'git://git.wincent.com/command-t.git'
@@ -80,6 +82,7 @@ map <Leader>rd :!bundle exec rspec % --format documentation<CR>
map <Leader>rf :CommandTFlush<CR>
map <Leader>rw :%s/\s\+$//
map <Leader>sc :sp db/schema.rb<cr>
+map <Leader>sj :call OpenJasmineSpecInBrowser()<cr>
map <Leader>sm :RSmodel
map <Leader>sp yss<p>
map <Leader>snip :e ~/.vim/snippets/ruby.snippets<CR>
@@ -254,6 +257,15 @@ autocmd User Rails Rnavcommand jspec spec/javascripts -g
" Don't add the comment prefix when I hit enter or o/O on a comment line.
set formatoptions-=or
+
+function! OpenJasmineSpecInBrowser()
+ let filename = expand('%')
+ let url_fragment = substitute(filename, "spec/javascripts", "evergreen/run", "")
+ let host_fragment = "http://localhost:54982/"
+ let url = host_fragment . url_fragment
+ silent exec "!open ~/bin/chrome" url
+endfunction
+
" ========================================================================
" End of things set by me.
" ========================================================================

0 comments on commit d024518

Please sign in to comment.
Something went wrong with that request. Please try again.