EmEditor (text editor) Forum Index
   EmEditor Core Enhancement Suggestions
     Request: selection length in status bar
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
tranglos
Posted on: 1/6/2008 4:22 pm
Just popping in
Joined: 12/2/2006
From:
Posts: 12
Request: selection length in status bar
Very often I need to ensure that a string does not exceed a particular length.

To this end it would be very helpful if EmEditor would display current selection length in the status bar, next to the cursor position field. I hoped this option would already be available in Customize -> Status, but it isn't. Could this be added, please?
Yutaka
Posted on: 1/6/2008 7:42 pm
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2401
Re: Request: selection length in status bar
Quote:

tranglos wrote:
Very often I need to ensure that a string does not exceed a particular length.

To this end it would be very helpful if EmEditor would display current selection length in the status bar, next to the cursor position field. I hoped this option would already be available in Customize -> Status, but it isn't. Could this be added, please?


Use the following macro:

SelLength.jsee:

status = "Selection: " + document.selection.Text.length + " characters.";


and run this macro when you want to find the selection length. Or, even better, set this macro run at the event of selection changed. To do this, select Customize on the Macros menu, in the My Macros tab, select this macro (SelLength.jsee) in the list, check Runs at Events, click Events button, and check Selection Changed.


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

tranglos
Posted on: 1/7/2008 5:26 am
Just popping in
Joined: 12/2/2006
From:
Posts: 12
Re: Request: selection length in status bar
This works great, thank you kindly!

(Now, about that "replace in all open documents" request od mine... :)
Deipotent
Posted on: 2/15/2008 3:41 pm
Just can't stay away
Joined: 2/15/2008
From:
Posts: 121
Re: Request: selection length in status bar
I set the delay time to 0.0 seconds, and there is still a delay before the status bar is updated. Is this a bug ?

I would also like it to show the number of lines in the selection. Is this possible ?

BTW, the documentation does not mention about the length property. Where can I find an up-to-date reference for all objects and properties ?
whileloop
Posted on: 2/15/2008 10:35 pm
Just popping in
Joined: 1/5/2008
From:
Posts: 15
Re: Request: selection length in status bar
It would be better if it can be put in a field on the right side of the status bar. So that it will not block other status messages.
Yutaka
Posted on: 2/18/2008 10:58 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2401
Re: Request: selection length in status bar
Quote:

Deipotent wrote:
I set the delay time to 0.0 seconds, and there is still a delay before the status bar is updated. Is this a bug ?

I would also like it to show the number of lines in the selection. Is this possible ?

BTW, the documentation does not mention about the length property. Where can I find an up-to-date reference for all objects and properties ?


The status bar is updated when EmEditor becomes idle, so it is not a bug. You can certainly include the number of lines in the selection. I will write the code if you would like me to. length property is not a property of EmEditor objects, rather it is a property of string object in JavaScript. JavaScript is a popular script language, and so you can find the reference in Web sites or in many books. Search for "JavaScript string length" in Google.


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

Yutaka
Posted on: 2/18/2008 11:00 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2401
Re: Request: selection length in status bar
Quote:

whileloop wrote:
It would be better if it can be put in a field on the right side of the status bar. So that it will not block other status messages.


Unfortunately, it is not possible to put in a field on the right side of the status bar with the current version of EmEditor.


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

Deipotent
Posted on: 2/18/2008 11:15 am
Just can't stay away
Joined: 2/15/2008
From:
Posts: 121
Re: Request: selection length in status bar
Is there no way of making it update immediately ?

If not, can you consider adding this ability, or have a separate option to display the number of bytes and lines in a selection on the status bar.
lutz
Posted on: 2/18/2008 5:44 pm
Just popping in
Joined: 12/6/2007
From:
Posts: 4
Re: Request: selection length in status bar
I am not sure if I fully understand the discussion.
But a display of the size of the current selection in the status bar would surely be really nice !!
Yutaka
Posted on: 2/18/2008 10:47 pm
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2401
Re: Request: selection length in status bar
Quote:

Deipotent wrote:
Is there no way of making it update immediately ?

If not, can you consider adding this ability, or have a separate option to display the number of bytes and lines in a selection on the status bar.


How many seconds do you have to wait until the status bar is updated with the correct number of bytes? It should be within a few seconds. If not, there might be something wrong with EmEditor.


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

(1) 2 »
Threaded | Newest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文