******* python vim tips ******* general vim notes vim should be/is an editor not an IDE The unix environment is an excellent IDE MacVim & gvim for windows available gvim a bit easier and geany has better defaults vim cheatsheet: http://www.pixelbeat.org/vim.tips.html _ example to test various settings if True: #going to pass pass elif False: return _ vim requires configuration vi -u NONE -C t.py distro vi without ~/.vimrc colours OK, rest not note 256 colour terminals supported vi with my ~/.vimrc _ though doesn't require too much I try to stay as close to official as possible essentially enabling included support for python go through python specific bits of my ~/.vimrc http://www.pixelbeat.org/settings/.vimrc _ lots of support for C make Ctrl-[np] K builtin indent logic _ indenting auto (need to indent first line) smart (c based so # messed up) expr (set by filetype plugin) _ whitespace visible toggle problematic highlighting tab settings _ autocompletion ^n ^x^o doesn't work for gtk? _ gf path PYTHONPATH dvd-vr.c - errno.h _ inpy http://www.pixelbeat.org/scripts/inpy not as required since omnicompletion added to vim 7 ipython tries a bit hard slow to start confusing prompts prompt to exit http://www.pixelbeat.org/settings/.inputrc import gtk fullscreen (not large font) gtk. gtk.get ls(gtk, "*event*") _ :help python python built in! for examplel put this in .vimrc to allow gf command to open sys modules python << EOF import os import sys import vim for p in sys.path: if os.path.isdir(p): vim.command(r"set path+=%s" % (p.replace(" ", r"\ "))) EOF _ more info http://blog.sontek.net/2008/05/11/python-with-a-modular-ide-vim/ makeprg :!javac % :!perl -c % :!gcc -fsyntax-only % :!sh -n % :!xmllint % no python syntax check (pychecker?) :!python -m py_compile % http://bugs.python.org/issue602345 (run without making pyc) ctags for sys modules setting breakpoints and debugging with pdb taglist plugin (function list etc.) show ]] setup by plugins pydoc plugin # zi = toggle folding # zA = toggle current fold # zj = goto next fold # zk = goto previous fold # vim: foldmethod=indent foldnestmax=1 foldtext=getline(v\:foldstart) fillchars=