Skip to content

Instantly share code, notes, and snippets.

@pielgrzym
Last active October 7, 2015 09:48
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 pielgrzym/3146108 to your computer and use it in GitHub Desktop.
Save pielgrzym/3146108 to your computer and use it in GitHub Desktop.
function! RunDoctests()
let fname = expand('%:p')
:w<cr> :vne
:set ft=python
:set buftype=nofile
:setlocal noswapfile
:exec ':silent r!python2 -m doctest -f' fname
endfunction
autocmd FileType python nnoremap T :call RunDoctests()<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment