bandung at skyesystems.com
Wed Jan 3 21:26:36 CET 2007
I managed to find two scripts that add the features that I was looking for
when editing python scripts within Pocket Vim.
1. Navigation Shortcuts
Using my trusty "OpenWith" utility that attaches to pocket explorer, I open
the python file with Vim. What's nice about this utility is that it shows
the file extension, something pocket explorer can't do. I vastly prefer to
use Total Commander for everything else. Once Total Commander fixes their
"alternate notepad's " ability to open files on a path that has spaces (ie
\Storage Card\, then I will no longer need this utility.
The Vim script used to quickly navigate around the source code is called
"python menu". This script, when placed within the "plugin" directory under
Vim, adds an additional Vim sub menu called "Python" as the following image
Clicking on this menu affords the programmer an addtional set of choices for
finding the next class or function, as an example. Also of interest is the
ability to change indentation.
But what is really cool is the top most menu item called Update IM-Python
menu. When you click on this, Vim scans your source code and creates
another menu within Vim called IM-Python. A list of all of your functions
and classes is created and stored within a submen under IM-Python. You can
easily jump to whatever function you want within the source code using this
feature. It also serves as a pretty nice summary of your code's structure,
by the way.
Now you can easily see all of your code structure and jump to a particular
2. Command Completion
This feature calls for yet another vim script called pydiction. With this
script placed within the plugin directory under Vim, you can now have all of
your favourite code completion commands for python. You can even add to the
stock completion commands by using the utility that comes with it to scan
another python module and load its command structure.
To use this feature you simply start typing part of your command and then
hit <Ctr- n> for next or <Ctrl-p> for previous. You will be presented with
a completed command. If it is not the one that you want, you can scroll
through all of the choices that it knows about for your partial word. I use
my SIP keyboard to enter the <Ctrl-n> keystroke combination. I also have
programmed a hardware keyboard combination for these combos as well. They
are <Tab><Tab>n and <Tab><Tab>p.
If you type "pri" and hit <Ctrl-n>, Vim completes it with "print" If there
are more than one possible choices for your word, then you can continue to
cycle through them by hitting <crl-n> again or <Ctrl-p> for a previous
The only thing left to wish for is the ability to run the python script that
I am working on while within Vim. There is a script that works for a
Windows desktop but I haven't been able to get it working completely for the
Now if we could only get the python debugger to work within Python25, we
would be in hog heaven as they say.
View this message in context: http://www.nabble.com/VimCE-tf2823987.html#a8147991
Sent from the Python - pythonce mailing list archive at Nabble.com.
More information about the PythonCE