From ff3b20671803a79c77308daa2537d56397d257ad Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Mon, 17 Aug 2015 16:37:29 -0700 Subject: [PATCH] More python stuff --- vim/ftdetect/python.vim | 19 +++++++++++++++++++ vim/rc/plugins.rc.vim | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 vim/ftdetect/python.vim diff --git a/vim/ftdetect/python.vim b/vim/ftdetect/python.vim new file mode 100644 index 0000000..2d70016 --- /dev/null +++ b/vim/ftdetect/python.vim @@ -0,0 +1,19 @@ +au VimEnter,BufRead,BufNewFile *.py + \ if executable('ipython') | + \ call neoterm#repl#set('ipython') | + \ endif | + \ if executable('pytest') | + \ call neoterm#test#libs#add('pytest') | + \ endif + +let g:neomake_python_pytest_maker = { + \ 'exe': 'py.test', + \ 'errorformat': &errorformat, + \ } + +let g:neomake_python_tox_maker = { + \ 'exe': 'tox', + \ 'errorformat': &errorformat, + \ } + + diff --git a/vim/rc/plugins.rc.vim b/vim/rc/plugins.rc.vim index c3248ca..175fb5b 100644 --- a/vim/rc/plugins.rc.vim +++ b/vim/rc/plugins.rc.vim @@ -170,6 +170,11 @@ Plug 'tmux-plugins/vim-tmux' " Python {{ Plug 'alfredodeza/coveragepy.vim' Plug 'alfredodeza/pytest.vim' +" pytest.vim {{ +nmap ptp :Pytest project +nmap ptf :Pytest file +nmap ptm :Pytest method +" }} pytest.vim Plug 'davidhalter/jedi-vim' " jedi-vim {{ let g:jedi#completions_enabled = 0