Browse files

Mapping for inferior slime 'run last spec'

  • Loading branch information...
1 parent ebf6af5 commit 6491c4f7aecbedb3026d74450ecdb3fef0c7d52b ph7 committed Jun 26, 2012
Showing with 8 additions and 0 deletions.
  1. +7 −0 vim/bundle/inferior-slime/plugin/inferior-slime.vim
  2. +1 −0 vim/ruby_mappings.vim
@@ -51,11 +51,18 @@ function! s:InferiorSlimeSpecLine(...)
silent exec g:InferiorSlimeOpenWinCmd
+function! s:InferiorSlimeSpecLast(...)
+ let args = [g:InferiorSlimeCmd, 'spec', 'last']
+ cgetexpr system(join(args, ' '))
+ silent exec g:InferiorSlimeOpenWinCmd
command! -nargs=* -complete=file InferiorSlime :call s:InferiorSlime(<f-args>)
command! -nargs=* -complete=file InferiorSlimeRestart :call s:InferiorSlimeRestart(<f-args>)
command! -nargs=* -complete=file InferiorSlimeSpecAll :call s:InferiorSlimeSpecAll(<f-args>)
command! -nargs=* -complete=file InferiorSlimeSpecFile :call s:InferiorSlimeSpecFile(<f-args>)
command! -nargs=* -complete=file InferiorSlimeSpecLine :call s:InferiorSlimeSpecLine(<f-args>)
+command! -nargs=* -complete=file InferiorSlimeSpecLast :call s:InferiorSlimeSpecLast(<f-args>)
" vim: syntax=vim
@@ -9,6 +9,7 @@ map <silent> <LocalLeader>rs :!ruby -c %<CR>
map <silent> <LocalLeader>sa :wa<CR> :InferiorSlimeSpecAll<CR>
map <silent> <LocalLeader>sb :wa<CR> :InferiorSlimeSpecFile<CR>
map <silent> <LocalLeader>sf :wa<CR> :InferiorSlimeSpecLine<CR>
+map <silent> <LocalLeader>sl :wa<CR> :InferiorSlimeSpecLast<CR>
map <silent> <LocalLeader>sr :wa<CR> :InferiorSlimeRestart<CR>
map <LocalLeader>rd Orequire 'ruby-debug';debugger<ESC>

0 comments on commit 6491c4f

Please sign in to comment.