Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Small changes to title case command #106

Open
SandmansDreams opened this issue Nov 16, 2024 · 0 comments
Open

[FR] Small changes to title case command #106

SandmansDreams opened this issue Nov 16, 2024 · 0 comments

Comments

@SandmansDreams
Copy link

Hello. I use the title case from your plugin all the time and would like to make some requests in terms of some slight changes in how it works. This is both for easier user function and also to better match Obsidian parity. If you want I can try to make the modifications myself as I am beginner plugin developer and could use the practice.

NOTE: "|" used to represent cursor or selection bounds.

Feature Description

Problem 1: Obsidian parity

In obsidian, if your cursor is in the middle of the word and you do a formatting key command (bold for example), the entire word is bolded. With Text Format's title case, this does not work and instead does nothing. It can also cause some issues when using multiple cursors such as selecting the lines in-between two cursors instead of just the word it falls into (likely a bug).

Example

Input:

The te|xt that is selected.

Result:

The Text that is selected.

Problem 2: Toggle for acronyms

Not a huge deal, but it would be nice to have a toggle where any words with all capital letters (excluding after apostrophes such as "USA's" or "FBI's") are unchanged by title case. I know that there is the feature of ignored strings, but I often come across new acronyms in my day-to-day and would like to be able to toggle to just ignore them entirely. I realize this would cause problems with titles in all caps but those don't occur often for me and I am not sure how you would get around that other than people with that issue would just have to toggle it back on and be careful, so not a huge deal IMO.

Example

Input:

|I love the USA's passion.|

Result:

I Love the USA's Passion.

Problem 3: Inter-word capitalization

It would also be nice to have a toggle for inter-word and hyphenated phrases. I love my hyphens to have both parts capitalized but title case ignores the second half (which is fair, it might be the grammatically proper way to do it). I also see a case where it would make sense (especially if writing code) to do inter-word stuff like "thisIsAFunction" but I would rather it title case the whole word even if partially selected, mostly because it is easy to miss the first letter when selecting a word. However, many people may not like that which is why I think it should definitely be a toggle.

Example

Input:

This t|itle| has a |use-case|.

Result:

This Title has a Use-Case.

Conclusion

I can understand if these features are rejected. I love this plugin and would just like these features for ease of use. Either way ill keep using it. Thank you for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant