Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to provide Python syntax coloring inside Webstorm?

I have a Python project, and I use WebStorm as my Editor. The problem is that Python's syntax doesn't get colored.

How can I display Python pages with a nice syntax? I am not searching more than than. I'm not going to develop pages in Python, but I do want them to get displayed nicely in Webstorm.

like image 436
neoswf Avatar asked Aug 26 '14 19:08

neoswf


People also ask

Can you use Python in WebStorm?

1 Answer. Show activity on this post. That is not possible: this plugin is not compatible with WebStorm (as WebStorm does not have other plugins/functionality that is needed for Python plugin).

Does PyCharm have syntax highlighting?

Syntax highlighting The PyCharm editor respects highlighting of the keywords, comments, parameters, type hints and so on. The particular highlighting colors are defined in the Editor | Color Scheme page of the Settings/Preferences dialog.

Does PHPStorm support Python?

There is no way to install Python plugin in PHPStorm. Please use IntelliJ IDEA Ultimate to employ all languages (JavaScript, Java, PHP, Python, Ruby, Scala, etc.) support in one environment.


1 Answers

Your ONLY option in WebStorm is to use TextMate bundles support plugin with Python bundle -- it will provide syntax highlighting (no completion or syntax checking etc).

This official article (with pictures) is for PhpStorm, but it should work the same for WebStorm as well: http://confluence.jetbrains.com/display/PhpStorm/TextMate+Bundles+in+PhpStorm

There are several TextMate bundles available for Python: https://github.com/textmate?utf8=%E2%9C%93&q=python

Alternative solution: migrate to PyCharm Pro -- it does all what WebStorm does + Python.


UPDATE: 2019-06-18

2019.2 version will come bundled with syntax highlighting for about 20 languages (all done via the aforementioned TextMate bundles plugin).

https://blog.jetbrains.com/webstorm/2019/05/webstorm-2019-2-eap/

In WebStorm 2019.2, we’re adding syntax highlighting for over 20 different programming languages, including PHP, Python, Ruby, and Java. It just works – no additional configuration needed.

With this change we want to improve the experience of our users who occasionally have to look through some code written in different languages that are not supported in WebStorm. But WebStorm is still primarily an IDE for JavaScript and TypeScript developers, so we don’t plan to extend the support for these other languages beyond syntax highlighting.

Syntax highlighting for these languages is built using TextMate grammars, and WebStorm bundles a collection of grammar file for different languages. Currently they are shipped as part of the TextMate Bundles plugin (so you can see a full list of supported languages under Preferences | Editor | TextMate Bundles), but they are going to be moved to the IntelliJ Platform soon.

enter image description here

enter image description here

like image 84
LazyOne Avatar answered Oct 13 '22 15:10

LazyOne