Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime text find in selection

When I select multiple lines of text in text editor Sublime Text 3, and try to find (Ctrl+F) an existing string in it, it fails. In fact, any highlighting I do somehow makes the string unfindable. For example, if I highlight all text in my file, and Ctrl+F an existing string, it is unable to find any matches. Only when the string I want to find is not highlighted can the string be searched.

I have the 'in selection', 'highlight matches', and 'wrap' flags on when highlighting. My user preferences are as follows:

{     "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",     "font_size": 10,     "auto_find_in_selection": true,     "trim_trailing_white_space_on_save": true,     "ignored_packages":     [         "Vintage"     ] } 

Any help will be appreciated. I have been trying to figure this out for an hour. Originally I had "auto_find_in_selection" set to false - I thought that was the culprit, but the problem persisted even after setting it to true.

like image 500
George Newton Avatar asked Dec 17 '13 00:12

George Newton


People also ask

How do I search in Sublime Text?

Use the Search all shortcut: Ctrl + Shift + F , then select the folder in the "Where:" box below. (And for Mac, it's ⌘ + Shift + F ). If the root directory for the project is proj, with subdirectories src and aux and you want to search in all subfolders, use the proj folder.

How do you do find and replace in sublime?

To use Find and Replace in Sublime Text 3, you can either click “Find” in the top-bar, then select “Replace” from the list, or you can press the keyboard shortcut Ctrl+H – the same way it works in, for example, Microsoft Office Word.

How do you select all occurrences of a word in Sublime Text?

Two handy ways to use find to work with the selection: Ctrl+F3 to find the next occurrence of the current word or selected text. Alt+F3 to find all occurrences of the current word or selected text.


1 Answers

go to settings-> user and add this line:

"find_selected_text": true 

next time you select a text and press cmd+'f' it will be there as default search.

like image 86
Sagiv Ofek Avatar answered Oct 08 '22 11:10

Sagiv Ofek