Status indications: UTF-8 BOM/signature, EOL style, and Unicode code point?

The encoding indication at the bottom of KomodoEdit is very nice. And the menu that allows me to change it (by clicking on the indication) is very nice, too.

  • I wonder if there is a way to get an indication in the status bar of whether or not the UTF-8 encoding (or UTF-16/32, for that matter) has a BOM/signature or not? (See for example the EmEditor status bar, which says, “UTF-8 with signature”.)
  • How can I get an indication in the status bar of the line ending style being used? (Again see EmEditor, which has e.g. “CR+LF (Windows)” as one option.)
  • How can I get an indication in the status bar of the Unicode code point under the cursor? (Again EmEditor, as one option, will show e.g. “U+0067” under the cursor. Unipad is especially nice in this area, providing an entire status bar with Unicode code point, Unicode character name, Unicode category, Unicode character block, etc.)

As a follow-up question, does the add-on API allow me to add things to the status bar — and/or to add new status bars?

Thanks in advance!

If I’m correct all of the above are not included in komodo. For the EOL i wrote a widget that does this (already talked about it in my previous answer “Impressed with EOL handling” :wink: ).
The API does allow you to add things in the status bar, for the EOL in the statusbar i already filed a enhancement request, but it didn’t, make it to komodo.
For an example how to do this in the enhancement request you will find code examples how to add this kind of stuff to your status bar. It also provides some useful links that will you help build your addons.


To add some specifics to what @babobski shared I would get the Komodo Extension Developer:

You can then use the JS Shell tool to explore the available properties and functions on relevant objects in Komodo. Here’s a small snippet of what you’re interested in:

var view = require("ko/views").current().get(); //UI wrapper around file
var doc = view.koDoc; // State of the file
doc.existing_line_endings; // outputs enum for Const vars in koDoc
doc.encoding.short_encoding_name; // Outputs current encoding

EDIT: You would then use the above code in a Userscript to update the Status bar with the information you wanted. Here’s a Userscript that I wrote for another user that updates the Status bar with Byte position of the cursor (redundant info from what @babobski shared, btw. There is alot more info in the ticket he shared):

You also might be interested in this post on our website about customizing Komodo. I’m updating it right now and will be pushing the changes in a few minutes (today at least) but it’s all relevant:

  • Carey

Thanks for all the feedback, everyone. I look forward to reading all this documentation and exploring the options.