evandrocoan / WordingStatus

Real-time Word, Char, Line and Page counter, in the status-bar for the document, line or selection. Sublime Text
Other
7 stars 1 forks source link

Redundant counts #10

Open reagle opened 1 year ago

reagle commented 1 year ago

My status bar looks like 49 Words, 255 Chars, Bookmark Layer: bookmarks, marksman, 6 lines, 304 characters selected.

I'm wondering: is the title case Word and Chars from this plugin? (I think so, and if so, how can I hide the native counts? I also note that the character counts are different.

evandrocoan commented 1 year ago

They referred to the selected elements and came from the sublime, and this package also creates the duplicated: image

The Chars may be removed as improved, but it counts words with different logic from sublime..

reagle commented 1 year ago

I've disabled all of the WordingStatus counts except enable_count_lines. I'd like it's count to be near ST's char and line count, is there a way to set the ordering in the status bar. I see the config attribute status_order_prefix but I'm not sure what it does? (And changing it tends to lead to duplicate counts appearing in the status bar.)

Qhilm commented 1 year ago

Seems that one is counting spaces as characters, but the other is not.

eugenesvk commented 4 days ago

status_order_prefix but I'm not sure what it does?

This is documented in config, does it explain it? "status_order_prefix" : "" , // |""| Prefix the status name to change its order in the status bar, which uses alphabetical sorting (this allows moving the status bar items left or right)

Duplicates are due to the fact that the previous id isn't reset on renaming, you could try something like this to fix it (included in the PR linked below)

I've also added a simple string template that allows you to reorder individual counts and even group them with a custom separator (e.g., ⋮) in a PR linked below, so you could check that out

eugenesvk commented 4 days ago

I'd like it's count to be near ST's char

doesn't "char_ignore_whitespace" : true , //true Whether to skip whitespace for the character count do this? if you set it to false to include whitespace?

if so, how can I hide the native counts?

think that's not possible untill this FR is implemented to Sublime https://github.com/sublimehq/sublime_text/issues/2938

reagle commented 4 days ago

@eugenesvk, the behavior is so inconsistent/confusing, I'm not sure. With respect to: status_order_prefix, are you suggestiing that if I made that a or z it would show that and consequently change the ordering somehow. I can't make sense of what happens when I do so. (A duplicate count ends up showing.) On the char count, I think I disabled that for this plugin and use the native count.

eugenesvk commented 4 days ago

it would not show Z, but yes it would change the ordering: it would sort statusbar from this plugin to the right of the statusbar named Anotherplugin. Native messages (their order/position) can't be controlled (only some can be disabled and replaced with custom plugions) I've asked for some more control in this FR, so feel free to up that if you need more control