Skip to content

Instantly share code, notes, and snippets.

@djohnsonjr
djohnsonjr / gist:6031651
Created July 18, 2013 18:21
Vimrc to run current file with turn (instead of ruby) and run the current 'it' test if applicable. Based on https://github.com/r00k/dotfiles/blob/master/vimrc I am using turn because the name matcher is not working for me with ruby.
map <Leader>s :w<cr>:call RunCurrentTest()<CR>
map <Leader>ss :w<cr>:call RunCurrentLineInTest()<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Test-running stuff
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! RunCurrentTest()
let in_test_file = match(expand("%"), '\(.feature\|_spec.rb\|_test.rb\)$') != -1
if in_test_file
call SetTestFile()
@djohnsonjr
djohnsonjr / voices
Created April 29, 2011 20:34
Hear all of the voices on the mac from IRB
# drop in irb
voices = ["Agnes", "Kathy", "Princess", "Vicki", "Victoria", "Bruce", "Fred",
"Junior", "Ralph", "Albert", "Bad News", "Bahh", "Bells", "Boing", "Bubbles",
"Cellos", "Deranged", "Good News", "Hysterical", "Pipe Organ", "Trinoids", "Whisper", "Zarvox"]
statement = "hello world"
voices.each do |v|
`say -v #{v} "hi, I am #{v} and I want to say, #{statement}"`