sublime_text icon indicating copy to clipboard operation
sublime_text copied to clipboard

Search should also support explicitly "not whole word" search

Open acutro-alexh opened this issue 4 weeks ago • 5 comments

Problem description

Sometimes I want to find the opposite of a "whole word" - i.e., "not a whole word" :)

Preferred solution

A new option in search ("not whole word") that allows us to find, well, not whole words.

Alternatives

None?

Additional Information

No response

acutro-alexh avatar Dec 01 '25 12:12 acutro-alexh

May I ask the obvious question - why not just use a regex search? 🙂

keith-hall avatar Dec 01 '25 16:12 keith-hall

May I ask the obvious question - why not just use a regex search? 🙂

\B to the rescue!

michaelblyons avatar Dec 01 '25 20:12 michaelblyons

May I ask the obvious question - why not just use a regex search? 🙂

I feel regex is the opposite of good UX. Yes, it solves your problem, but for me it's too cumbersome to remember all the patterns. That's why we have UI features, no?

acutro-alexh avatar Dec 02 '25 23:12 acutro-alexh

I personally disagree with this one... The amount of regex syntax you need to know for this use case is minimal, and cluttering the UI for options which users don't need nor fully understand is generally a bad idea... See the issues with the current whole word toggle for example: https://github.com/sublimehq/sublime_text/issues/1603

keith-hall avatar Dec 03 '25 03:12 keith-hall

I personally disagree with this one... The amount of regex syntax you need to know for this use case is minimal, and cluttering the UI for options which users don't need nor fully understand is generally a bad idea... See the issues with the current whole word toggle for example: #1603

Ok. I agree that the decluttered UI is better, that's why I love Sublime in the first place, but in this case, it's a hidden feature, so I wouldn't mind. Anyway, we have our opinions :)

acutro-alexh avatar Dec 03 '25 08:12 acutro-alexh