VimCE

View: New views
4 Messages — Rating Filter:   Alert me  

VimCE

by JBirdAngel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

is it VimCE that you use from Rainer?

is this this and the command console things youve been talking about the best development platform for python? i dont know if im saying it right or what the difference between an editor and an IDE is unless the difference is the ide running the programs/scripts too, or are there other options available?

thanks - jason

_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce

Re: VimCE

by Bandung :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes it is Rainer's VIM.  I wish I knew how to compile Windows apps from source code.  In that case, I would try to get version 7.0 working.  

(1) The good news is that Rainer's Vim 6.0 version works quite well.  I had to add additional file folders and populate them with the necessary plugins in order to get all of the menu features working.  To do this, I installed the desktop version 6.3 of Vim and then copied the entire sub folder structure over into my pda and voila, everything worked except for one script, vim.vim.  When I deleted it, everything, and I do mean everything else within Vim worked.  I added the most up-to-date python syntax script I could find and that is what I use.

My pda has a hardware keyboard so I use it extensively.  I have programmed missing keys for the escape key and some other combinations such as ctrl-Q as an example.  I also wanted a backward slashes, etc.  I can get a lot of things done on my pda with this hardware keyboard.  Even though I have Calligrapher installed (which I love by the way) I don't need it when I am editing code.

I would be willing to zip my Vim directory and upload it somewhere in order for you to take a look at .  It has the _vimrc file setup for those features that I use.  You don't have to stick with them.  It will give you an idea of how useful this program is when you configure it to your liking.

(2) Now that I have managed to get a pocket console programme working, I don't see the need to use VIM as a pda console anymore.  

(3) The third thing that I wanted to have was the ability to have an "open With" option within my file explorer so that I could choose either of the following actions to a) launch the python module by clicking on it or b) open it within Vim for editing.  I was trying to get this working within Vim by writing a macro that would permit me to execute the module that I was editing but so far no luck.  What I discovered instead was a little utility that attaches itself to the windows file explorer and permits me to do jsut that.  If I click on the file, it executes.  If I click and hold, I get a context menu where I choose "open with" and then I use Vim to edit it.  

I wish Total Commander's "view" or "edit" command worked properly.  Unfortunately it doesn't  appear to use "" around the file name that is being clicked on so every file that is within a directory whose name has a space in it, doesn't lauch properly.  For example, all files within my storage card since they are inthe \Storage Card\"whatever.file" and because of the space, the program thinks the directory is  "\Storage" rather than "\Storage Card" .  The same thing is true with Resco's file explorer.  Their "open with" feture doesn't work on my Windows 5.0 device.  Now it could be that something I've installed is causing this behaviour since I don't see anyone else complaining about this.

(4) There are some capabilities within the current python ports that are missing that would help with debugging.  Examples are the ability to provide arguments when launching python such as

   python -i /myfile.py   (the ability to execute a module and upon its completion, switch to a working interpreter mode).
   python -m pdb /myfile (the ability to execute a command such as the python debugger "pdb" and then launch a module in the interpreter with the debugger running)


That's my experience to date.


JBirdAngel wrote:


 


is it VimCE that you use from Rainer?

is this this and the command console things youve been talking about
the best development platform for python? i dont know if im saying it
right or what the difference between an editor and an IDE is unless the
difference is the ide running the programs/scripts too, or are there
other options available?

thanks - jason




_______________________________________________
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce

Re: VimCE

by Bandung :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Editing vs IDE

Editing
The most sought after features that I like to see in an editor are context sensitive hiliting and a lot of short cut keys.  It would also be nice to have auto completion of commands.  I don't have the latter within VimCE.  

IDE
The ability to execute the modified code with a single click is really cool.  It would also be cool to support auto completion of commands.  A third feture would be the ability to enter some break points for debugging.  Another capability would be to be able to access a graphical GUI builder, look at your code using a UML viewing mode, etc.

IDLE is a pretty decent editor and IDE.  But I am far more proficient editing code from within Vim.  All I want over and above a decent editor for the pda environment now is the ability to execute that modified code easily without having to use 4 or 5 clicks  (to find files that are deep within some file folder structure on my Storage Card).   I have discovered a few work arounds which gets it down to two clicks and now I don't have to worry about a modified py module not being reloaded by IDLE and executed.   So that is the extent of my search for a better "IDE" at this juncture.


Re: VimCE

by Bandung :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 shows.



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 function.


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 choice.



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 Pocket pc.

Now if we could only get the python debugger to work within Python25, we would be in hog heaven as they say.


The files that I used to perform these features are as follows,

pydiction-0.5.tar.gz
python-menu.vim
OpenWith.ARM.CAB