Auto-capital sentences in .txt
-
How to make each sentence start with a capital letter as I type? (like in libre-office)
Preferably only in .txt files.
-
Hello, @carsten88 and All,
Surely, some guru guys on this forum, versed in
Python, could create a script for this purpose ! Unfortunately, I’m not part of them -:(
However, here is a regex search/replacement that you could run, once your text is completed :
-
SEARCH
([.?!])\x20*(\w) -
REPLACE
\1\x20\U\2
Notes : This regex verifies and changes any text file as expected :
-
It rewrites, first, the last character of each sentence
-
Then, it normalizes any amount of
spacechars, even none, toonespace only -
And, finally, it rewrites the first letter of the next sentence in
uppercase -
If this letter is already written as uppercase, nothing is modified !
Best Regards,
guy038
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login