From 880954b216bf16bbd4503a596e2788b77360816e Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 8 Jun 2019 00:39:33 +0200 Subject: vimrc: Move RSpec mappings to ftplugin/ruby.vim Since I'm not writing Ruby regularly right now, move these mappings to the Ruby ftplugin so I don't accidentally try to run a spec in another language where it makes no sense. --- ftplugin/ruby.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ftplugin/ruby.vim') diff --git a/ftplugin/ruby.vim b/ftplugin/ruby.vim index c829abe..e95b70f 100644 --- a/ftplugin/ruby.vim +++ b/ftplugin/ruby.vim @@ -18,6 +18,13 @@ nnoremap Zd obyebug nnoremap ZD Obyebug +" RSpec +nnoremap z :call RunCurrentSpecFile() \| call system("date '+%FT%T%z: z' >> ~/.vim/spec-stats.log") +nnoremap Z :call RunNearestSpec() \| call system("date '+%FT%T%z: Z' >> ~/.vim/spec-stats.log") +nnoremap 🕳 :call RunCurrentSpecFile() \| call system("date '+%FT%T%z: e' >> ~/.vim/spec-stats.log") +nnoremap ⛳ :call RunNearestSpec() \| call system("date '+%FT%T%z: E' >> ~/.vim/spec-stats.log") + + " Reset Rails test database nnoremap :!RAILS_ENV=test bundle exec rake db:reset -- cgit v1.2.3