fdorg / flashdevelop

FlashDevelop is a free and open source code editor.
MIT License
824 stars 221 forks source link

Status bar - add selection stats #908

Open gene-pavlovsky opened 9 years ago

gene-pavlovsky commented 9 years ago

It would be nice if selection stats could be added to the status bar (e.g. like in Notepad2). First stat shows how many characters (including newlines) are selected - that's very useful if for example you have a string with a string with several spaces o some number with a lot of digits and you want to quickly see how many spaces or digits are there - just select it and see the result. At the moment I copy the text, paste into Notepad2, then I can see that info easily. Second stat shows how many lines are selected. Just for completeness, but I'm sure there can be some usefulness in that as well. And the last stat I'd like to see is # of lines in a file. It could be a separate stat, or more compactly it can be added with a "/" to the current line stat: Line: 50 / 630. Another thing might be useful is # of columns in the current line.

Meychi commented 9 years ago

I like the idea but this message is localized and the space available could be sparse so i would not like to add it by default. Plugins could add this info as a extra text to status bar easily. I added max column and max line as they were easy to do and didn't add too much space.

elsassph commented 9 years ago

What about showing these stats only when you have a non-empty selection?

gene-pavlovsky commented 9 years ago

Mika, I've noticed you added total lines and columns, that's already super useful, thanks! Screen space issue makes sense, however on my 1920x1080 monitor the whole contents of the status bar fit in the left half of the screen. I wouldn't mind if the extra stats would be optional (with a setting) or implemented via a plug-in. Showing them only when there is a selection also makes perfect sense, since otherwise they are irrelevant (well besides when you select/deselect text, the file name would jump right / left).

gene-pavlovsky commented 9 years ago

Actually it already jumps left/right quite a lot when moving the caret up/down through some source code, as the column number and max number can easily jump from 1 to 3 and back digits each on lines without/with code. Not sure if padding the values to 3 digits would be good or not?