Help geting python/djano colors just right (migrating from Sublime)

Hi,

I'm experimenting with migrating to Pycharm from Sublime Text (using Sunburst theme), and trying to get my color scheme just right.

I've been looking at this exact color scheme for six years (since TextMate days) so it's kind of a make/break deal for me. I think it's mostly the Django keywords that are an issue.

I've used settings > Colors & Fonts: Python to get as close as possible. But a couple of things are still not quite right, and I can't figure out how to fix these issue in this settings panel.

If anyone can help me figure this out, would greatly appreciate it!

Here's a screenshot, on right is Sublime Text (ideal look) and left is PyCharm.

untitled_—_Giftster_and_listr_test_py_-_giftster-web_-____code_giftster-web_.png


1. @ decorator should be blue, but other symbols (+, -, etc) should remain orange

2. def and class keyword should be green, not orange. BUT other keywords like if and print should remain orange

3. Colon sign should be white (but other operators should remain orange, except @)

4. from and import should be orange, and known django modules should be purple

5. Known Django class parameters should be brown/italic

6. Known Django class methods should be purple

7. Known Django class method parameters should be white

8. Known Django settings variables (constants?) should be blue


Also, attaching the color scheme so you can replicate how close I got.

Thanks.

Edit:

Hmm maybe because of the file type, my custom theme attachment isn't showing up. Here's a shared dropbox link to it:

https://dl.dropboxusercontent.com/u/1936883/Sunburst%20Pycharm.icls
3 comments
Comment actions Permalink
Hey so it occurred to me that at least part of my problem might be that PyCharm does't come bundled with a list of django keywords to look for?

I think I need to take something like this:

https://github.com/textmate/python-django.tmbundle/blob/master/Syntaxes/Python%20Django.tmLanguage

And make a new Python file type called Python Django, which is a superset of the default python file type built into PyCharm PLUS the keywords in the above linked file.

I see how to add a new filetype, but can't seem to edit an existing one to view. Poked around on my file system and didn't see where the existing Python File Type is. Any pointers on that?
0
Comment actions Permalink
Continuing as crazy person who talks to himself on forum...

I made progress on this by attacking at it from a different angle, but still need help.

I got my editor in PyCharm looking like this:

test_py_-_untitled_-____PycharmProjects_untitled_.png


The only things off now are:

1. class names should be blue, not white & underlined
2. Code completion no longer works :(.

Code completion not working is a big deal breaker, doh.

The way I got my color scheme working is definitely what broke code completion. If I reverse the process, code completion comes right back.

Here's how I got this scheme working.

1. Got the Python TextMateBundle, edited Python.tmLanguage and imported all the <dict> clauses in the PythonDjango TextmateBundle/PythonDjango.tmLanguage, which I linked to previous in this thread. This gave me all of Python + the Django reserved keywords.

2. Settings > Editor > Text Mate Bundles. Added this new custom combined bundle I created.

3. Settings > Editor > File Types. Python Files: deleted *.py as an associated file, so that the TextMate bundle could associate itself with it. Pretty sure this is what's breaking code completion. However, if I don't do this, then the TextMate Bundle/Color Scheme doesn't take over and do it's syntax coloring job.

4. Finally, here's the crazy one: Edited /Application/PyCharma.pp/Contents/plugins/textmate/lib/textmate.jar. I renamed this jar file to .zip, uncompressed it, added the Sunburst.tmTheme to the zip, re-zipped it, and renamed it back to a .jar file.

5. Now when I went to Settings > Editors > TextMate Bundles, I can select 'Sunburst' from the dropdown menu under 'TextMate Color Scheme', where as before it was not an option.

Phew.

So I had to do some slightly crazy stuff to get this working, and I am really really close. But code completion is completely broken, so...thoughts?
0
Comment actions Permalink
For future searchers, I opened a support ticket for this, and they said what I want is currently not possible.

They recommended I open a feature request, which I have done so here:

https://youtrack.jetbrains.com/issue/PY-15356
0

Please sign in to leave a comment.