setlocal foldmethod=indent " Extra syntax highlighting let python_highlight_space_errors=1 let python_highlight_numbers=1 syn match Error /;$/ syn match Error /\/ syn match Error /\/ syn match Error /\/ syn match Error /\<[Nn]ull\>[^=]/ " Let :make compile python programs " setlocal makeprg=python\ -c\ \"import\ py_compile,sys;\sys.stderr=sys.stdout;\ py_compile.compile(r'%')\" setlocal makeprg=python\ % setlocal efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m if expand('%') =~ '/\?\ :!nosetests % else map :!python % endif " Use F7, F8 and F9 to insert useful Python statements map Oimport rpdb2; rpdb2.start_embedded_debugger("asdf") #BREAK map Ofrom nose.tools import set_trace as st; st.__dict__.get("off") or st() #BREAK map Oimport traceback, sys; traceback.print_exception(*sys.exc_info()) #TRACEBACK map Oimport traceback, sys; traceback.print_exception(*sys.exc_info()) #TRACEBACK map Ofrom pprint import pprint; pp = pprint #PPRINT if !exists("donePep8") let donePep8=1 command! -complete=file -nargs=? Pep8 :call DoPep8() function! DoPep8(...) if a:0 == 0 let to_check=expand("%:p") else let to_check=a:1 endif setlocal makeprg=/Users/wolever/Workspace/ExcelMatrix/server/pep8 {$*} setlocal errorformat=%f:%l:%c:%m execute "make " to_check endfunction endif