Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime text 3 find and replace in selection without clicking the button

Tags:

sublimetext3

I'm using ST3 with vintage mode. When selecting some lines and pressing alt+shift+f (Mac OSX) I get the find and replace dialog at the bottom of the screen.

BUT, I have to remove my hand from the keyboard, reach for the mouse and click the little "In selection" button...

...is there some way for sublime to realize that I have made a selection and have that button clicked by default?

like image 485
Cotten Avatar asked May 22 '14 09:05

Cotten


People also ask

How do I search and replace in Sublime Text?

Or, if you want to find and replace text in a number of files at once, press Command + Shift + F or Control + Shift + H to open Sublime Text's Find in Files tool that can search and replace across as many files as you have open or select from its menu.

What does Ctrl d do in Sublime Text?

Quick Add Next. To add the next occurrence of the current word to the selection, use Quick Add Next, which is bound to Ctrl+D on Windows and Linux, or Command+D on OS X. Again, if you go too far, use Undo Selection (Ctrl+U, or Command+U on OS X) to step backwards.

How do I select similar words in Sublime Text?

Alt+F3 gives a really simple way to do find and replace: Use it to select all occurrences of the current word or selection, then just start typing to replace or edit them all at once.

How do I replace multiple lines in Sublime Text?

Use CTRL+D at each line and it will find the matching words and select them then you can use multiple cursors.


1 Answers

Try setting:

"auto_find_in_selection": true,

From my understanding, this will automatically use 'in selection' if you have non-empty selection when goes into find box.

[Edit] Note, you generally set this settings in "Preferences.sublime-settings". You can open this setting by "Ctrl+Shift+P", and select "Preferences: Settings - User".

like image 93
Angus Yeh Avatar answered Sep 25 '22 22:09

Angus Yeh