ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

[IDEA] Notepad: Highlight all text after X number of characters/words

(1/5) > >>

vevola:
You know those fields on websites, where you can enter 2000 characters of text and not more?
I tend to write in notepad or somewhere and then copy/paste into the field, just to find the text having been truncated.

My idea for a Coding snack would be a simple notepad UI, where you specify 1) the number, 2) whether you’re counting words or characters, and 3) if characters include non-space or not. All text beyond that limit will be in red.

The notepad would have tabs for various texts. It would also have backup every x minutes for x number of backups automatically saved.

This would be useful in editing texts down to the proper limit. I know you can check the number count, but this idea is to have a visual representation, where you actually see how many words/chars you’re over as you’re typing, and dwindle your way down til you have no more “red”.

Full disclosure: I'm not a dev, and I had posted this idea as a Notepad+ plugin.

publicdomain:
Nice snack idea @vevola! I'm in with Limitpad! :Thmbsup:

vevola:
Nice snack idea @vevola! I'm in with Limitpad! :Thmbsup:
-publicdomain (February 27, 2021, 09:25 AM)
--- End quote ---

Awesome! Are you thinking of making it a Notepad+ plugin, or a Word macro, or a standalone EXE?
This will def save me (and others) time especially with sending online applications!

KodeZwerg:
For training purposes I quickly programmed my own Editor for such purpose.

Counting characters was easiest part.

Counting words bring me many troubles.

What is a word?

My problem for now is 'how to make differences between real words and no words that are between spaces/quotes/point or comma terminated etc etc etc'

My buggy examples where I do not have a real good solution yet.

A) 
A.
$ 1.99
(Text)
Text&Text
"Text(text)_text"
[email protected]
88÷2=99.99
123.456,789
Text^2
Word's
0x0A 0F B0
(Ascii Emojis at all)
(Unicode stuff at all eg arabian)

And many more of such stuff.
Without any rules it is hard to define how to detect whats a word and whats not, and how words are counted correct.

No worry @vic, I do not interfere and wont publish my binary, can't await how you solve such problems, great stuff what I've seen so far!  :Thmbsup:

vevola:
what is a word?
-KodeZwerg (February 28, 2021, 06:58 AM)
--- End quote ---

I would make it simple:
a "word" for this project's purpose is defined an any string of consecutive characters (alphanumeric, punctuation and special characters, anything) separated by a SPACE, LINE or PARAGRAPH SEPARATOR (not including non-breaking spaces).

So

--- ---$ 1.99 counts as two "words"
whereas
--- ---$1.99 counts as one.


EDIT: https://wordcounter.net/ would agree with this definition!

Here is a links (with more linked text inside) if you want to geek out more: :)
https://en.wikipedia.org/wiki/Word_count#Details_and_variations_of_definition

Maybe it would be smart to use the above as a default, and add a "Customize word breaks" setting, if people want to include dashes, slashes or whatever as word boundaries...

Navigation

[0] Message Index

[#] Next page

Go to full version