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

Version Path
mj-0.5.4 .project.vim
mj-0.5.3 .project.vim
mj-0.5.2 .project.vim
mj-0.5.1 .project.vim
mj-0.5.0 .project.vim
mj-0.4.2 .project.vim
mj-0.4.1 .project.vim
mj-0.4.0 .project.vim
mj-0.3.0 .project.vim
mj-0.2.0 .project.vim
mj-0.1.0 .project.vim
dotfiled-0.3.0 .project.vim
dotfiled-0.2.0 .project.vim