PDA

View Full Version : Display current cursor position from top of file



bzjwlgsvaf
10-13-2015,
Is there a way to display the current cursor position in Komodo Edit? I frequently work with binary files and need to update pointers after edits. It would be great to have this displayed with the line and column info or assign a macro to a hot key to display this elsewhere. Any ideas? I am new to Komodo and love it.

capilta
10-15-2015,
The current line and cursor position (as well as the current selection) are displayed at the bottom right of Komodo, in the status bar.

CharismaticMannequi
10-17-2015,
Thanks for the reply.
For clarification - I need the position from the top of the file not just the current line and column. My editor is only displaying line and column values and I would like to get it to display the absolute position from the top of the file. If I select everything from the top of the file to the position I would like to know, the editor will display the number of selected characters "ch". This method works for very small files but when the file is a few thousand lines it is a real pain in the ...

Brockeupdam
10-18-2015,
I was able to get something close as a Macro assigned to a key.
komodo.assertMacroVersion(3);
var out = "echo " + komodo.editor.currentPos;
if (komodo.view && komodo.view.scintilla) {
komodo.view.scintilla.focus();
ko.run.runEncodedCommand(window, out);
}However, the files I am working with contain some 2-byte characters and the function returns the number of bytes not the number of characters. I need the number of characters.
Any other Ideas???