2

I am trying to use sublime to write code, I want to know how to configure sublime so it can do auto-complete as eclipse does?

I have installed PyQt4, and it's ok if I use eclipse, if I write the following code: from PyQt4. After I input the dot, a list of possible matches will show in a drop-down list? how can I do this with sublimerope? I am using mac. Which configuration needs changed?

Adam Wagner
  • 15,469
  • 7
  • 52
  • 66
python
  • 1,870
  • 4
  • 24
  • 35
  • Is auto complete a feature of the editor? – Gareth Latty Dec 25 '12 at 14:07
  • yeah,but I want to use auto-complete ,it seems that eclipse+pydev will analyze the context synatx and then do a syntax complete. I am not sure how to configure sublimerope to do this. As I said,it seems the default sublimerope will not do a synat match – python Dec 25 '12 at 14:12
  • My point is that it may simply not be supported by sublime - I can't see any mention of auto-complete on the site. – Gareth Latty Dec 25 '12 at 14:19
  • there is sublimeclang,which is a plugin for clang,it can do syntacx check and do the auto-complete stuff,but it's for cpp. I am not sure if the sublimerope can do such things – python Dec 25 '12 at 14:21

1 Answers1

1

The solution here http://messymind.net/2012/07/why-you-should-use-sublime-text-2/ worked for me:

Go to your new .ropeproject folder in your project and edit the config.py. Find the section that looks like this: ?

#You can extend python path for looking up modules
#prefs.add('python_path', '~/python/')

Here you can add the sources to your site-packages and your current open project, e.g.: ?

prefs.add('python_path', '/path/to/site-packages')
prefs.add('python_path', '/path/to/your/project')
Sam
  • 6,437
  • 6
  • 33
  • 41