sublime text 2 with python

On 30/09/2016 at 10:27, xxxxxxxx wrote:

hello , 
I have started to learn plugins development , and thought of using sublime text 2 as my code editor , I have tested it and it is great , it give you auto- complete for python methods , functions ...etc and even if I typed something , the next time I try to type it , it show up in the guess list , and this is super helpful , 
what I want to know .
Now to the main question , is it possible to add c4d modules to "sublime text"dictionary ?
and just a side question , when I create python file the extension is .py , should I change it manually to .pyp ? 
thanks ,

On 30/09/2016 at 12:51, xxxxxxxx wrote:


I'm not sure you can add c4d's definitions in any meaningful way, but yeah, when you're saving a python file for a plugin, manually append the .pyp extension that C4D expects for plugins.  Note that you can have Sublime display .pyp files with Python highlighting by default by going (on Sublime 3, not sure about 2) to Preferences->Settings - Syntax Specific (when you have Python set as the current Syntax, which will automatically open Python.sublime-settings) and adding


between the main {}'s.

(Don't forget to close and re-open Sublime when you change that settings file, if you haven't already :slightly_smiling_face: )

On 01/10/2016 at 03:14, xxxxxxxx wrote:

thanks for reply :) 
I didn't know about sublime 3 (that's explain why I don't have any updates to sublime text 2 :D)

On 04/10/2016 at 07:27, xxxxxxxx wrote:

While I have no idea on the auto-completion question, never tried it, I just want to add how to make Sublime Text 2 highlight Python in Cinema 4D Python plugin files (.pyp) :
Simply open such a file in Sublime Text and then menu "View" -> "Syntax" -> "Open all with current extension as...", select Python there and done.

On 04/10/2016 at 09:02, xxxxxxxx wrote:

Oh, nice, how did I never notice that :sleepy:

On 04/10/2016 at 09:05, xxxxxxxx wrote:

To be honest, until today I always edited the config files manually. Just as I wanted to describe how to do this in this thread, I discovered the menu option... I mean, it's the topmost one, it's not that easy to see. :wink:

On 04/10/2016 at 09:39, xxxxxxxx wrote:

thanks guys of the help , 
never mind the auto-complete , sublime is intelligent , so it remembers variable name ..etc 
P.S. I have just noticed that Xcode have a python editor (with highlight ..etc ) similar to sublime .