pycharm code completion / syntax highlighting for django in haml files - django-templates

I just tried to use HAML in my django project, which works fine^^
But while writing beautiful HAML code PyCharm refuse to offer any code completion or syntax highlighting for django template tags like in HTML files.
Do I need to configure PyCharm differently or is it just not possible to get the "Django Support" in HAML files with PyCharm?
Thanks in advance

I've found an older issue related to this one.
"At the moment the HAML support is part of the RubyMine code and can't be
used in other products. We have an issue for making it independent:
http://youtrack.jetbrains.net/issue/RUBY-6432"
Not sure if they managed to extract the HAML support to PyCharm or not. Their tracker is overloaded so I couldn't check it.

Related

PyCharm: Python template language is stuck on jinja2

The PyCharm parses is complaining about all the colons in my Django template:
The error message it gives is "Expected }}".
This started happening after I created a separate project that has jinja2 templates. That is, it was working fine before, but is now complaining about those colons. So, it is probably something I did to the settings.
I do have the Python Template Language set to Django:
I don't know what else to check.
I just noticed, that the icon next to testfile.html is "J2". This should be HTML. I think the problem is that changing the template language back to Django is not doing anything. PyCharm still thinks it is a jinja2 template. Any help?

Can Webstorm play nice with Chai language chains?

I am using Mocha+Chai for a current Node.js project. My IDE is Webstorm 11.
Unfortunately, it seems Webstorm has no way of figuring out how language chains in Chai's should/expect are supposed to work. The following is commonplace:
I have tried explicitly setting both Chai and Chai-DefinetlyTyped as libraries for my project via Settings->Javascript->Libraries, but this does not resolve anything.
For the sake of tool support, I have considered dropping expect/should for assert instead, as this works perfectly. However, I very much prefer the style of expect/should, so it would be amazing to see a solution to this.
Problem is caused by weird dynamic way these chains are defined. As a workaround I can suggest using chai.d.ts:
Open "Settings | Languages & Frameworks | JavaScript | Libraries"
Click "Download..." button and select "TypeScript community stubs"
Find "chai" and click "Download and Install".

How do I turn on syntax highlighting for StringTemplate templates (*.st) in intellij?

I have a string template file (.st) in IntelliJ that I would like to see syntax highlighting on. How can I turn this on? I can't seem to find it anywhere.
The best solution is to use HTML syntax for *.st files. You can set this in Preference > File types > HTML.
Short answer is - you can't.
Someone must first implement a syntax highlighter plugin for the format.
The StringTemplate author, Terrence Parr, has begun work on such a plugin for String Template 4 but it does not support the older .st file format.
I tried the plugin. Even on .stg files it is not ideal if you use a dark editor theme.

Intellisense for Objective-J?

My editor of choice for Objective-J Cappuccino development right now is Sublime Text 2. Unfortunately I haven't had any luck finding an Objective-J intellisense autocomplete plugin. It seems it should be doable, since Objective-J does have (optional/pluggable) types. So I think a plugin could definitely parse the code to find the expected type of the object you're trying to autocomplete on, and then look up its method list. Does anyone know of any other editors that support intellisense for Objective-J?
They is only one intellisense plugin for vim available.
You can find a little example video on youtube :
http://www.youtube.com/watch?v=lJrOcHxq6vc
Plugin:
https://github.com/nanki/vim-objj
For Sublime Text 2 you can try https://github.com/aparajita/Cappuccino-Sublime, although it is not that "intelli" as vim plugin.
After installing you should be able to get autocompletion using Ctrl+Space.

Objective-c code formatter site to create html that can be embedded into a blog

I'm looking for site similar to http://www.manoli.net/csharpformat/ that allows one to put in c# code snippet and it formats the html to post into your blog with a CSS file.
I need one that actually does this for Objective-C.
You want the GeSHi (Generic Syntax Highlighter) library. It's is excellent, has dozens of languages (including Objective-C, with the ability to automatically linkify classes/protocols to the documentation), and support for many popular CMSs (Django, WordPress, Drupal, Joomla, Mambo, etc).
If you'd like to see it in action, you can check out nearly any wiki page on our local CocoaHeads website. For example: http://cocoaheads.byu.edu/wiki/different-nslog
Assuming you're on a Mac, copying code from Xcode will keep the syntax coloring. Any WYSIWYG blog editor should support that.
In case your blog software isn't WYSIWYG, you can paste into TextEdit and save as HTML. It outputs pretty crappy HTML considering it's just highlighted source code, but it's nonetheless compliant HTML.
Other than that, I don't know of an online service for that.
I use pygments (python) to generate syntax highlight for source code examples embedded in blog.
If your entry text is just the source code it will work the same for what you are after, I tested it to highlight Objective-C as well.
I actually use markdown syntax to type plain text blog post in a file and I copy plain text code examples. Then I run the file via markdown processor, which includes pygments for highlight and store it into a file.
It's as simple as:
include markdown
html = markdown.markdown(text,['codehilite'])
See simple script at the link which just takes file name of your plain text file and creates html file.
Then I can copy/paste the code.
You have to include link or copy the css as well to get the syntax highligh but it's easy.
I do this for blogger, see example how to use markdown with pygments to do syntax highlight.