Last active
October 7, 2015 09:48
-
-
Save pielgrzym/3146108 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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