Rabbit Slide Show

Getting started with vim-test

2016-10-13

Description

Given at <http://vimberlin.de/october-2016-meetup>

Text

Page: 1

Getting
started with
vim-test
2016/10/13

Page: 2

Why?
run your tests with one
command
support for many test
frameworks:
rspec, vader, gotest, phpunit,
pytest, …

Page: 3

Commands
:TestNearest: Runs the test
nearest to the cursor
:TestFile: Test the whole
file
:TestSuite: Runs all tests
:TestLast: Runs the last
test command again

Page: 4

Strategies
dispatch, vimux, neovim
make, tslime, vimproc

Page: 5

Defining strategies
let test#strategy =
"dispatch"
or more granular:
let test#strategy = {
\ ‘nearest’: ‘vimux’,
\ ‘suite’: ‘dispatch’
}

Page: 6

Chose strategy via
commandline
:TestNearest -strategy=basic

Page: 7

CLI options
:TestNearest --backtrace
or configure it:
let test#ruby#rspec#options = '-f html'

Page: 8

Mappings
nmap
nmap
nmap
nmap
nmap
<silent>
<silent>
<silent>
<silent>
<silent>
<leader>t
<leader>T
<leader>a
<leader>l
<leader>g
:TestNearest<CR>
:TestFile<CR>
:TestSuite<CR>
:TestLast<CR>
:TestVisit<CR>

Page: 9

Alternative: plain
dispatch
:Dispatch rspec %
:Dispatch bundle exec rspec
:execute "Dispatch rspec " . expand("%") . ":" . line(".")

Other slides

Vim and flog Vim and flog
2019-03-29
cmus and vim cmus and vim
2017-01-19