Hi! I am considering TextMate for my Python development, comparing it to Emacs/Vim, WingIDE, and Eclipse/PyDev and such.
Using the official Python bundle I seem to only get completion on commands, not lookup of methods on the object at the cursor. I think I got this working in the Ropy bundle (Ctrl+p for completion), both rope and ropeide is installed in Python. But I can't seem to get definitions of methods and functions by pressing Ctrl+] (Ropy) and using F3 and ^H (Python Bundle), I get only module and function defs, not methods.
(Maybe getting method defs easily popping up isn't vital, but as a Python n00b, I find it very convenient.)
So, which bundles is recommended by you Python&TextMate 1337 guys? :)
Right now I find myself switching back and forth between Emacs and TextMate. TextMate is slick and .. cute, but I get completion and defs of methods and everything in Emacs ... (WingIDE is nice, but expensive.)
Phil wrote:
Using the official Python bundle I seem to only get completion on commands, not lookup of methods on the object at the cursor.
You'll need to install both ropy at a system-wide level and the textmate-ropy bundle to get this, but it worked for me. To install ropy, just go to a terminal prompt and type
sudo easy_install ropy
Then to install the textmate-ropy bundle, you'll need to check it out of Subversion, apparently. Again at the shell prompt:
svn co http://textmate-ropy.googlecode.com/svn/trunk/ textmate-ropy
(I presume you know Subversion, but if you don't, that creates a "textmate-ropy" directory.) Then just double-click on the Ropy.tmbundle file that will be in the textmate-rope directory you've created.
The autocompletion command for TM-Ropy appears to be ^P; ^] will take you to the definition of a method.
Having said all this, this is actually the first time I've used Ropy! I tend to keep a Ctags file up to date for my projects using the "TM Ctags" bundle, which gives me the ^] equivalent for nearly all languages. (There are two Ctags bundles, but in my experience the other one doesn't work.) The autocompletion that this bundle provides looks a little barebones to me but I guess it could be cool.
I will say that if you get used to Emacs -- I never quite have -- it does do really well with dynamic languages like Python and Ruby. I've tried to switch away from TextMate to several other coding environments but keep ending up back here, though; despite my frustration with a few misfeatures and concerns about the program's future development status, once you really start taking advantage of its power it's awfully hard to leave.
On Mon, Apr 25, 2011 at 7:21 PM, Watts Martin layotl@gmail.com wrote:
Using the official Python bundle I seem to only get completion on commands, not lookup of methods on the object at the cursor.
You'll need to install both ropy at a system-wide level and the textmate-ropy bundle to get this, but it worked for me. To install ropy, just go to a terminal prompt and type
sudo easy_install ropy
pip or easy_install does not seem to find ropy: "No local packages or download links found for ropy"
It could be this: http://code.google.com/p/ropy/downloads/list But the zip file there is not a regular "python setyp.py install" installation. And it's a web server-thingy ... I assumed textmate-ropy used rope and/or ropeide ... (which is installed as root on the system)
Then to install the textmate-ropy bundle, you'll need to check it out of Subversion, apparently. Again at the shell prompt:
svn co http://textmate-ropy.googlecode.com/svn/trunk/ textmate-ropy
(I presume you know Subversion, but if you don't, that creates a "textmate-ropy" directory.) Then just double-click on the Ropy.tmbundle file that will be in the textmate-rope directory you've created.
Yes, this is the Ropy.tmbundle I installed. I just took "svn co" (or "export") to ~/Library/Application\ Support/TextMate/Bundles, and reloaded bundles in TM.
The autocompletion command for TM-Ropy appears to be ^P; ^] will take you to the definition of a method.
That,'s what I thought, but only ^P works, not ^] ... (Selecting it from the menu doesn't work either.)
Having said all this, this is actually the first time I've used Ropy! I tend to keep a Ctags file up to date for my projects using the "TM Ctags" bundle, which gives me the ^] equivalent for nearly all languages. (There are two Ctags bundles, but in my experience the other one doesn't work.) The autocompletion that this bundle provides looks a little barebones to me but I guess it could be cool.
I was looking into ctags for a MacVim as IDE setup, but I seemed to get a lot of completions of irrelevant stuff. I'm not sure if that was the creation of the tags file that was done wrongly, or if it was the vim plugin(s) that didn't parse intelligently or was misconfigured. But I don't really care if it's Ropy, rope, ctags or something else, I just want it to work nicely ... :) So with ctags, would I be able to get method and function defs easily popping up somehow? :)
The RopeMate bundle looks nice for completions, but I don't seem to get method definitions with this bundle.
I will say that if you get used to Emacs -- I never quite have -- it does do really well with dynamic languages like Python and Ruby. I've tried to switch away from TextMate to several other coding environments but keep ending up back here, though; despite my frustration with a few misfeatures and concerns about the program's future development status, once you really start taking advantage of its power it's awfully hard to leave.
Yes, I actually got most stuff working nicely in Emacs, but I do have some issues with it, and TextMate feels less "cluttered" ...
On Mon, Apr 25, 2011 at 3:43 PM, Phil textmate@luminated.net wrote:
I am considering TextMate for my Python development, comparing it to Emacs/Vim, WingIDE, and Eclipse/PyDev and such.
At this point I have actually had the best experience with Emacs, but I still find TextMate to be nice, so I bought a licence – despite the recent thread on users feeling abandoned, lacking news on TM2. (One scary thing happened just half a minute after entering the licence, though: My first "quit unexpectedly" crash of TextMate. I hope the program does not start to misbehave now after my trial days are over – "sorry, honeymoon's over, back to reality" ... :-D)
Also, I look forward to testing TM when I drop back to some Ruby stuff later ... :)
Using the official Python bundle I seem to only get completion on commands, not lookup of methods on the object at the cursor. I think I got this working in the Ropy bundle (Ctrl+p for completion), both rope and ropeide is installed in Python. But I can't seem to get definitions of methods and functions by pressing Ctrl+] (Ropy) and using F3 and ^H (Python Bundle), I get only module and function defs, not methods.
As for command completion, it works nicely, both RopeMate and Ropy works. RopeMate is nicer. But I have not gotten definitions of methods to work/pop up. It should be Ctrl+] in Ropy, I think, but it doesn't work. So, call type defs and such works better in Emacs, but still I like TextMate's project drawer/organizing, and after setting full path to my python installation first in PATH (under advanced), stuff seems to work well.
So, if any of you Pythonistas have other tips, stuff I should look, let me know. Else I will probably just switch back and forth between Emacs and TM until I find out which gives the best flow in the long run. (Unless I feel the need for a real IDE when I start digging into a bigger project I probably will be working on.)