I propose this another patch that also adds LineLength.
If that worth, then you can change the default statusbar.text.1
statusbar.text.1=\
li=$(LineNumber)/$(NbOfLines) co=$(ColumnNumber)/$(LineLength) curPos=$(CaretPosition)/$(BufferLength) $(OverType) ($(EOLMode)) $(FileAttr)
w/ or w/o : curPos=$(CaretPosition)/$(BufferLength)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Users can display anything they want in the status bar by defining properties and using them in statusbar.text.<n> The properties can be set in an OnUpdateUI script like
local xxx = 999
function OnUpdateUI()
xxx = xxx +3
props['xxx'] = xxx
end
While the examples here are of some use, there are a very large number of potentially useful values that can be extracted from the document and displayed in the status bar. It is better for users to understand the mechanism so that they can produce something useful to them rather than to have a long list of canned variables.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't know if that worths to include this script into the repository of SciTE. In this case, I don't know how to include it into scite source code. Anyway, I post it into this issue.
function OnUpdateUI()
local caretPos = scite.SendEditor(SCI_GETCURRENTPOS);
props['CaretPosition'] = caretPos;
local lineLength = scite.SendEditor(SCI_GETCOLUMN,
scite.SendEditor(SCI_GETLINEENDPOSITION,
scite.SendEditor(SCI_LINEFROMPOSITION, caretPos))) + 1;
props['LineLength'] = lineLength;
end
Jérôme
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I propose this another patch that also adds LineLength.
If that worth, then you can change the default statusbar.text.1
statusbar.text.1=\
li=$(LineNumber)/$(NbOfLines) co=$(ColumnNumber)/$(LineLength) curPos=$(CaretPosition)/$(BufferLength) $(OverType) ($(EOLMode)) $(FileAttr)
w/ or w/o : curPos=$(CaretPosition)/$(BufferLength)
Users can display anything they want in the status bar by defining properties and using them in statusbar.text.<n> The properties can be set in an OnUpdateUI script like
local xxx = 999
function OnUpdateUI()
xxx = xxx +3
props['xxx'] = xxx
end
Then add $(xxx) into the status bar:
statusbar.text.1=\
$(xxx) li=$(LineNumber) co=$(ColumnNumber) $(OverType) ($(EOLMode)) $(FileAttr) code.page=$(code.page)
While the examples here are of some use, there are a very large number of potentially useful values that can be extracted from the document and displayed in the status bar. It is better for users to understand the mechanism so that they can produce something useful to them rather than to have a long list of canned variables.
Thx for the explanation.
I will try to do this script to add this value into statusbar.
I don't know if that worths to include this script into the repository of SciTE. In this case, I don't know how to include it into scite source code. Anyway, I post it into this issue.
function OnUpdateUI()
local caretPos = scite.SendEditor(SCI_GETCURRENTPOS);
props['CaretPosition'] = caretPos;
local lineLength = scite.SendEditor(SCI_GETCOLUMN,
scite.SendEditor(SCI_GETLINEENDPOSITION,
scite.SendEditor(SCI_LINEFROMPOSITION, caretPos))) + 1;
props['LineLength'] = lineLength;
end
Jérôme
There are a couple of sites for SciTE scripts and settings:
Oriented towards Lua:
http://lua-users.org/wiki/SciteScripts
Anything related to SciTE:
http://code.google.com/p/scite-files/