Skip to content

Instantly share code, notes, and snippets.

@jonbri
Created November 15, 2017 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonbri/9eb77f19945872cb831d37eec8a5aa1b to your computer and use it in GitHub Desktop.
Save jonbri/9eb77f19945872cb831d37eec8a5aa1b to your computer and use it in GitHub Desktop.
Blank template for VimScript/Vader testing
" Blank template for Vader testing
" Invoke with `:Vader`
" Resources:
" https://github.com/junegunn/vader.vim
" https://junegunn.kr/2013/10/testing-vimscript-with-vader-vim
Before;
function! FooBecomesBar()
:silent! %s/foo/bar/
endfunction
nnoremap c( :call FooBecomesBar()<CR>
Given();
foo()
Do:
c(
Expect;
bar()
Given();
foo()
Execute:
call FooBecomesBar()
Expect;
bar()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment