FAQ - Frequently Asked Questions: Some questions get asked again and again.
Why does PIDA appear to hang when changing files?
When using Metacity (only as far as we can tell) for some reason Vim's confirmation dialog box from "confirm e /path/filename.py" appears behind the PIDA instance. We are not entirely sure why, but there are two fixes available:
- In vim (or in .vimrc) make Vim use text-based confirmation dialogs which will always be visible, like so: :set guioptions+=c
- Use a different window manager
Both these fixes are recommended.
Is PIDA available for Windows?
No (0.5.0)
Nearly (short answer). The actual answer is that it does work on windows pretty successfully, with most of the plugins also running successfully. You can see a screenshot of PIDA running Windows in a VMWare screenshot. The bit that is not yet complete is packaging it so that it can be easily installed by Windows users. Read the WindowsInstallation if you want to try it yourself.
Vim on Windows is not embeddable (at this time). Instead we use the text editor Moo, which is cross platform. We may attempt to embed Vim on windows in a separate Window using Com or OLE. But since none of us are Windows users we could use some development and testing help.
How do I make PIDA+VIM open files in new tabs like with :tabedit?
For now (until someone adds an option to PIDA, you need to modify the source.
Described here:
http://groups.google.com/group/pida/browse_thread/thread/15a9f21d8daebb44/5102ddaad4cb44d7
Why does :bd and :bdelete not work to remove a file from the PIDA buffer list?
(only applies <= 0.4)
Because that doesn't actually unload the file from Vim. The recommended action is to use :bw which for some reason the Vim documentation suggests you don't do. The docs say:
:[N]bw[ipeout][!] *:bw* *:bwipe* *:bwipeout* *E517*
:bw[ipeout][!] {bufname}
:N,Mbw[ipeout][!]
:bw[ipeout][!] N1 N2 ...
Like |:bdelete|, but really delete the buffer. Everything
related to the buffer is lost. All marks in this buffer
become invalid, option settings are lost, etc. Don't use this
unless you know what you are doing.
I am not sure that we "know what we are doing" but it is tried and tested and we have been using it for a couple of years now and it works.
The reason that regular :bd doesn't work is that this doesn't call the Vim Autocommand associated with unloading files, and PIDA needs this to react to. So using :bd will *appear to* close the buffer in Vim, until the next time you select it in the PIDA buffer list.
NOTE: This is fixed in 0.5
Why is PIDA unstable on my system
python-gobject 2.16 is totally broken and unstable, this is shipped with:
- Ubuntu Jaunty (enable jaunty-proposed https://wiki.ubuntu.com/Testing/EnableProposed to fix this)
However, 2.15 or 2.17+ are just fine.
Why does VIM not show any colors ?
If you are on arch linux, the /etc/vim/gvimrc is broken. Delete it and report a bug the package maintainer :-) Maybe if enough do, they will fix it…
I'm getting strange python errors
Q: RuntimeError?: cannot unmarshal code objects in restricted execution mode
A: This happens because of the pyc corruption and either in your pida folder or in the python library somewhere.
Usully you changed a file somewhere in your python lib by accident and the pyc file is not consistent with the py file anymore. as root under debian run:
find /usr/lib/python2.5 -name "*.py" | xargs /usr/bin/python2.5 /usr/bin/py_compilefiles -f
to fix all python2.5 files for example
How do I detect PIDA is running in my .vimrc?
PIDA provides a variable (PIDA_EMBEDDED) that you can read in .vimrc that you can use to do specific configurations based on whether or not vim is running in PIDA:
if !exists("PIDA_EMBEDDED")
" your vim-only vimrc commands here
endif
if exists("PIDA_EMBEDDED")
" your vim-in-pida vimrc commands here
endif
