Syntax rules for .pml files in sublime text.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Pymol Syntax

Syntax rules for pymol scripts in sublime text and other textmate-style text editors. I have only tested in Sublime Text but it should work with any color scheme in any editor that uses .tmlanguage files. Automatically detects the .pml extension and applies itself.

This works both with the more standard command target, options syntax and the cmd.command('target', options) syntax.



This preview is using the spacegray theme and color scheme.


Package Control:

Install the package named Pymol Language and it should work automatically on .pml files.


Copy the pymol.tmlanguage and Comments.tmPreferences files into the user packages folder. On Mac, for sublime text 3, this folder is ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/. After this, syntax highlighting should immediately be applied to all .pml files.


I am using AAAPackageDev to convert the YAML file into a plist file which is readable by sublime text. Make your changes in that file, then submit changes as a pull request.


I took inspiration from Michal Gajda's syntax definition for pymol. If you are looking for a syntax definition for vim, I recommend it.