Platform:

Creating a grammar (converting from TextMate)

It’s possible that you have themes or grammars from TextMate that you like and use and would like to convert to Pulsar. If so, you’re in luck because there are tools to help with the conversion.

Converting a TextMate grammar bundle

Converting a TextMate bundle will allow you to use its editor preferences, snippets, and colorization inside Pulsar.

Let’s convert the TextMate bundle for the R programming language. You can find other existing TextMate bundles on GitHub.

You can convert the R bundle with the following command:

$ pulsar -p init --package language-r --convert https://github.com/textmate/r.tmbundle

You can now change directory into language-r to see the converted bundle. Once you link your package with the pulsar -p link command, your new package is ready to use. Launch Pulsar and open a .r file in the editor to see it in action!

Converting a TextMate syntax theme

This section will go over how to convert a TextMate theme to an Pulsar theme.

Differences

TextMate themes use plist files while Pulsar themes use CSS or Less to style the UI and syntax in the editor.

The utility that converts the theme first parses the theme’s plist file and then creates comparable CSS rules and properties that will style Pulsar similarly.

Convert the theme

Download the theme you wish to convert.

Now, let’s say you’ve downloaded the theme to ~/Downloads/MyTheme.tmTheme, you can convert the theme with the following command:

$ pulsar -p init --theme my-theme --convert ~/Downloads/MyTheme.tmTheme

You can then change directory to my-theme to see the converted theme.

Activate the theme

Once your theme is installed, you can enable it by launching Pulsar and opening the Settings View with the Edit > PreferencesPulsar > PreferencesFile > Preferences menu item. Then select the "Themes" tab on the left side navigation. Finally, choose "My Theme" from the "Syntax Theme" dropdown menu to enable your new theme.

Your theme is now enabled. Open an editor to see it in action!