Home Download Buy Blog Forum Support

Smart search / replace within selection lost on ST3

Smart search / replace within selection lost on ST3

Postby skqr on Wed Mar 20, 2013 12:10 am

Hey, guys.

Not sure if this is a bug or a feature, hence, this thread.

On ST2, when your selection included a line break and you hit Ctrl+F or Ctrl+H to either search of replace, the "within selection" option was turned on, automatically. This feature appears to have been lost, broken, or removed on ST3.

If it's broken or lost, this is plead to the devs to fix it or add it - I use ST3 on a daily basis (I know I'm not supposed to be working with it, but it's just too tempting), and other than goto-anything, this is probably the feature I used the most, and I sorely miss it.

If it has been removed, this is a plead to the product owners to splash some cool water on their faces and regain control of their senses. I have nothing but the uttermost admiration for the ST team in general, but, guys, I'm dead serious - this killer feature is a must have.

Thanks.
skqr
 
Posts: 2
Joined: Wed Mar 20, 2013 12:03 am

Re: Smart search / replace within selection lost on ST3

Postby robertcollier4 on Wed Mar 20, 2013 1:17 am

+1 - when doing a replace on a block of text in a document - I keep having to reclick the "In selection" icon on the replace bar. This greatly slows my task because it makes me have to reach for the mouse for what would otherwise have had been a keyboard-only operation.

If I wanted to do a replace on the whole document - then I wouldn't have selected anything first (or would have cleared my selection). if I have something selected - then I would like the replace bar to assume to replace "in selection".
robertcollier4
 
Posts: 154
Joined: Sun Feb 24, 2013 5:37 pm

Re: Smart search / replace within selection lost on ST3

Postby ern on Wed Mar 20, 2013 1:30 am

+1 I hit this several times today.
ern
 
Posts: 8
Joined: Tue May 10, 2011 6:14 pm

Re: Smart search / replace within selection lost on ST3

Postby fooziex on Thu Mar 21, 2013 10:44 pm

This is very important to me as well. I think this is a "feature," since the ST3 beta announcement lists: "Find: Find in Selection will no longer be automatically selected".
fooziex
 
Posts: 10
Joined: Tue Oct 02, 2012 8:22 pm

Re: Smart search / replace within selection lost on ST3

Postby skqr on Wed Mar 27, 2013 1:43 am

Thanks, foozlex - hadn't seen that.

Amazing.

Is there any way to put this to a vote? I feel like it's just plain wrong. I doubt the kind of power users Sublime attracts would be baffled by the smart activation of "within selection". Getting complains about how "confusing" it is is the only reason I can imagine for them to have cut it.
skqr
 
Posts: 2
Joined: Wed Mar 20, 2013 12:03 am

Re: Smart search / replace within selection lost on ST3

Postby fooziex on Thu Mar 28, 2013 5:55 pm

skqr wrote:Thanks, foozlex - hadn't seen that.

Amazing.

Is there any way to put this to a vote? I feel like it's just plain wrong. I doubt the kind of power users Sublime attracts would be baffled by the smart activation of "within selection". Getting complains about how "confusing" it is is the only reason I can imagine for them to have cut it.

I've posted about this in the technical support forum before, and got no reply. There was also a thread by jdao that was about this same issue, which also sunk into oblivion. I'd at least like a setting that lets you toggle this behavior.
fooziex
 
Posts: 10
Joined: Tue Oct 02, 2012 8:22 pm

Re: Smart search / replace within selection lost on ST3

Postby giorgian on Fri Mar 29, 2013 11:44 am

I generally avoid to post "me too" replies, but, please, bring back Find in Selection!
giorgian
 
Posts: 10
Joined: Mon Dec 19, 2011 1:09 pm

Re: Smart search / replace within selection lost on ST3

Postby Kicweed on Fri Mar 29, 2013 4:15 pm

+1 on this being very frustrating and also feeling like a bug.

Can you please add a "smart" flag setting that turns this on if the search/replace is invoked after a selection is made? So, invoking a search/replace without a selection keeps this off and you end up searching/replacing globally, but, starting with a selection constrains the action only inside the selection.
Kicweed
 
Posts: 22
Joined: Mon Jan 09, 2012 9:48 am

Re: Smart search / replace within selection lost on ST3

Postby robertcollier4 on Fri Mar 29, 2013 6:53 pm

Is there a way I can bind a hotkey to the "In selection" button in the replace bar so that I don't have to reach for my mouse?

Update, figured it out:
Code: Select all
{ "keys": ["alt+s"], "command": "toggle_in_selection",
    "context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},


Still, when I am doing a replace - it is 80% of the time "In selection" and 20% in the the whole document. I would prefer that it is always "in selection" whenever I invoke the replace bar with something selected.
robertcollier4
 
Posts: 154
Joined: Sun Feb 24, 2013 5:37 pm

Re: Smart search / replace within selection lost on ST3

Postby Kicweed on Mon Apr 01, 2013 9:36 am

Thanks a lot robertcollier4, I've added your keymap and it makes things much easier.

I tried combining the showing of the panel and the toggling of the selection in a single macro. Have a look at the macro code below. It didn't work, the console complains that both commands are unknown.

Any idea how the two could be combined? Also, can you set the selection mode instead of toggling it? I'd like to be able to invoke the Replace panel with the setting set to on, regardless of its previous state.

Code: Select all
[  {
        "command": "show_panel",
        "args": {"panel": "replace", "reverse": false}
    },
    {
        "command": "toggle_in_selection",
        "context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
} ]
Kicweed
 
Posts: 22
Joined: Mon Jan 09, 2012 9:48 am

Next

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 10 guests