I have a problem with jinja2 highlighter in sublime 3.All the files associated with .html
extensions don't recognize jinja templates blocks..I searched the web but the only solution I found is to make a .jinja.html custom extension..anyone got any idea how to solve this?..This is the plugin I installed https://packagecontrol.io/packages/Jinja2
You need to add .j2 to your file extension:
mysupertemplate.html.j2
Have a look at the syntax file (under fileTypes)
Related
I have been looking for a fork of the CookieCutter project (see https://cookiecutter.readthedocs.io/en/latest/readme.html), which helps generate a python project template that automates building python apps and also generates a config file for CircleCI.
So far the templates generated have a .travis.yml file, I'd like a .circleci/config.yml instead.
I have been reading the docs on https://cookiecutter.readthedocs.io/en/latest/readme.html and searching on the internet for alternative forks.
Currently, the project templates generate a .travis.yml file and we like to have a .circleci/config.yml file, when using the python cookiecutter CLI tool.
https://github.com/nolte/cookiecutter-circleci
Cookiecutter Template for a CircleCI, Continuous integration/Continuous delivery Pipeline, for different types of projects.
Is there a way to install the Python plugin on WebStorm?
Some StackOverflow posts say to go to project settings (or project structure), then go to "modules", but I think that is just for IntelliJ and not specifically WebStorm, as I can't seem to find it.
I also downloaded https://plugins.jetbrains.com/plugin/631-python, but when I try to "Install plugin from disk" on the .zip file, it says
plugin python is not compatible with this installation.
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).
List of supported IDEs is clearly written at the top of that page:
If you need full Python support, have a look at PyCharm -- JetBrains IDE for Python: https://www.jetbrains.com/pycharm/
If you just want some syntax coloring for Python code: have a look at this answer: https://stackoverflow.com/a/25545919/783119
Also: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000634624-Python-support-for-webstorm
I found a way to run a python script in webstorm. I needed it to run the backend part of the project. I add node configuration to run configuration and edit interpreter to python path
This is the node configuration:
I am trying out Sphinx for generating documentation for a Python project. Just to make sure I can actually make it work, I have made a test project to try it out on: https://github.com/ThomasA/sphinxtest.
I have run sphinx-quickstart in the root of this repository. In the following questions, I specified 'doc' as the documentation root, named the project 'sphinxtest', entered 'Thomas Arildsen' as author, answered 'y' to the 'autodoc' option, and selected the default setting for everything else.
I expected the 'autodoc' option to cause the generation of a file 'amodule.rst' in the 'doc' folder. However, this does not get generated. I am puzzled by this. I thought this was what the 'autodoc' option was supposed to do and what I have seen examples of others apparently achieve with it. Sphinx completes without any error messages, so it seems to be doing what it thinks it should do. So, what could I be doing wrong?
I am using Sphinx v. 1.5.6 and Python 3.5.3, all installed with Anaconda.
autodoc does not generate the .rst source files.
Instead first use sphinx-apidoc to generate the source files. Then run Sphinx to make your documentation.
An alternative to Percy's answer is autoapi written by Carlos Jenkins. He provides a Sphinx extension that generates the ReST files per documentation generation. You can configure the output ReST by modifying a template file.
https://github.com/carlos-jenkins/autoapi
A bottle project of mine uses Jinja2. PyCharm does not automatically recognize it and shows such lines as errors. Is there a way to make Jinja2 work?
In the pro edition, these template languages:
Jinja2
Django
Mako
are supported. You can configure the template language in the project's settings:
The community edition may lack certain template languages.
I think it's worth to mention that PyCharm Community edition does not support Jinja2, Mako and Django. It's available only in PyCharm Professional.
See comparison of the two.
Yes pro edition from pycharm does support Jinja2 to enable it go here
From File open Settings and search for python template under Languages & Frameworks Select Python Template Languages from there Click HTML And Select Jinja2 as Template Language.
please see the image for better understanding.
If you are using .jinja extension instead of .jinja2, it won't work, templates are not highlighted.
You have to add the file extension to the filetypes section.
Preferences > General > Filetypes
Scroll to Jinja 2 Template
Register new pattern by clicking +, add *.jinja
In community edition, the python template option is not available, so you can simply click on python packages next to the terminal present on the bottom. This will also add Jinja2
Hello How can I enable syntax highlighting for HTML/CSS/JS in Eclipse I am mainly developing in python using the PyDev package but right now I am creating Cheetah templates and they are very hard to read unhighlighted.
Any plugin/package suggestions related to Cheetah or just highlighting any file as html would be greatly appreciated.
thank you.
Can I somehow trick Eclipse into treating .tmpl files as if they were .html?
It's not a trick.
Under Windows -> Preferences, General -> Editors -> File Associations, you can associate *.tmpl files with your HTML editor.