Last Updated: March 13, 2019

EditorConfig Your Komodo

Ever heard of [EditorConfig]? We sure have. Numerous requests have come in for us to add support, on our bug tracker, our forums and even in person (we still have the stickers). A few weeks ago I finally took a few hours to just focus on implementing [EditorConfig], roadmaps be damned.

It was actually surprisingly simple to implement using the libraries the [EditorConfig] project provides. Komodo’s backend is largely Python based so all I had to do is include their Python library and expose it to our editor component.

[EditorConfig] in Komodo actually comes with a nice little extra; you can use Komodo preferences too! Meaning any simple string, boolean or integer preference that Komodo uses can be defined in your .editorconfig file. For example:

root = true

indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

; Komodo Settings
editAutoWrapColumn = 140 ; Edge line column at 140 characters
editWrapType = 1 ; Wrap by word
trackchanges_enabled = false

Notice the little section at the bottom there? Now keep in mind that these preferences were never intended to be exposed this way, so finding out what preferences you can use and how they work can take a little digging ([DOM inspector] to the rescue), but it makes for some interesting use-cases.

Keep in mind that this extra functionality is very experimental. If you mess up your Komodo install you can easily reset file level preferences by deleting your [doc-sate.xmlc][doc-state] file from your profile folder (while Komodo is not running).

View Source


Nathan Rijksen

Nathan Rijksen

Nathan Rijksen is the Development Lead for Komodo IDE. He works adeptly with Mozilla, Python and JavaScript to ensure that Komodo IDE is the IDE of choice for development teams. Nathan has been working with Komodo IDE for a decade before joining the development team in 2012. Since then he has worked tirelessly on new features such as Commando, Breadcrumbs, a completely new UI and much more.