Sha256: 67d5f03d2a47a1c366548dddd35daf58466743a283847440b8158f53ab7c3b0c
Contents?: true
Size: 1.02 KB
Versions: 13
Compression:
Stored size: 1.02 KB
Contents
autocmd FileType ruby nnoremap <buffer> <leader>T <esc>:call RunTestFile()<cr> autocmd FileType ruby nnoremap <buffer> <leader>t <esc>:call RunTestFileFilteredByLine()<cr> autocmd FileType ruby nnoremap <buffer> <leader>at <esc>:call RunAllTests()<cr> function! RubocopFixCs(target) let options='' let cmd = 'bundle exec rubocop' if filereadable('./bin/bundle') let cmd = './bin/bundle exec rubocop' endif if filereadable('.rubocop.yml') let options = ' --config=.rubocop.yml ' endif let full_command = cmd . " -A " . options . a:target call ClearEchoAndExecute(full_command) endfunction function! RunTestFileFilteredByLine() let command = "bundle exec run_test " . expand('%') . " --line=" . line(".") call ClearEchoAndExecute(command) endfunction function! RunTestFile() let command = "bundle exec run_test " . expand('%') call ClearEchoAndExecute(command) endfunction function! RunAllTests() let command = "bundle exec run_test " . expand('%') . " --all" call ClearEchoAndExecute(command) endfunction
Version data entries
13 entries across 13 versions & 2 rubygems