22

PyCharm doesn't seem to support YAML Syntax highlighting by default. Is there a plugin? I didn't see anything obvious when I Googled for one.

travis1097
  • 2,829
  • 5
  • 23
  • 23
  • 4
    http://www.jetbrains.com/pycharm/features/editions_comparison_matrix.html -- check **Platform** section. YAML available in Pro edition ONLY. – LazyOne Nov 14 '13 at 12:18
  • I am using the Community Edition so this is the answer to my question. Thanks. – travis1097 Nov 14 '13 at 19:03

3 Answers3

16

This works for me in the community edition: File -> Settings -> File Types -> Add a type for yaml

I didn't do anything else except set '#' as the line-comment character.

This colors basic names, values, strings and comments nicely.

enter image description here

If you can't find the option, search for "File Types" in the search box in the Preferences window.

jonatan
  • 9,011
  • 2
  • 30
  • 34
rupello
  • 8,361
  • 2
  • 37
  • 34
6
  1. Go to Settings
  2. Code Style
  3. Yaml

If you don't see this, you're probably using the community edition where I didn't find a way to get Yaml highlighting working.

Inti
  • 3,443
  • 1
  • 29
  • 34
3

I'm using the YAML/Ansible support plugin with PyCharm 4.5.1 Community Edition, and it's good enough for my basic needs:

YAML/Ansible support with Jinja2 tags

Based on NEON by juzna.cz

Provides:

  • Index of all roles in Goto Class...
  • Index of all properties in Goto Symbol...
  • Reference Jinja2 variable declaration
  • Reference to role declaraion
  • Various completions
  • Documentation lookup

This is a very basic version and needs a lot of polishing. Please help at the https://github.com/vermut/intellij-ansible

alexandrul
  • 12,856
  • 13
  • 72
  • 99