Sublime Text search status and cancel [duplicate] - search

How can I cancel an ongoing search in sublime text?
basically when I do a recursive folder search for a particular text using
ctrl + shft + F
But sometimes it runs infinitely given a bad search pattern.
How to cancel a bad search of course without closing Sublime text?

One of the way to stop the search I use is to search again with an invalid path.
That does the trick for me. Hope that helps

It is currently not possible to stop a "Find in Files" search once it has begun. Closing the "Find Results" panel or tab doesn't affect it - it only means you won't see any further results that are found.
It has been logged as an issue here:
https://github.com/SublimeTextIssues/Core/issues/1481

Looks like closing/re-opening Sublime stopped my search. Since Sublime starts up quickly with your previous tabs, this should be an easy operation.

I believe if that panel is in "focus" you can simply hit the ESC key.

Related

How can I search for a second pattern in vi without deleting the first search pattern

In vi text editor, let's suppose I want to navigate through all instances of "cheese" in a text file, so I type "/cheese" and press ENTER. I can use n or N to go to the next/previous instances. If I change my mind and I want to search for "cheesecake", pressing "/" will delete "cheese" so I need to type "cheesecake" instead of only typing "cake".
Most graphical text editors will have the capability to save the last search pattern. Emacs also has this capability. I haven't found how to do this in vi.
I know of no way to make it keep the last command on the line when you open it but you are certainly able to press the up arrow and page through previous commands you've issued. So just type /, hit the up arrow key, type "cake".
PS - This doesn't really belong here. Stackoverflow is about programming questions. You might be better off asking this kind of question over at SuperUser.com.

Find & replace code across all files in a folder in Linux

I have been using Notepad++ for Windows when I want to find a certain text across all files in a given folder. This was extremely useful for debugging my MatLab code because one project entails tens of MatLab files.
I could also replace all texts into another across all files in a folder.
I could also replace things like /r/n which means line replacement.
Now I must need to work on a Linux server. Notepad++ couldn't be installed on the university server I am allotted to. And as far as I tried, Sublime Text couldn't find and replace things like /r/n
What option do I have on Linux?
Sublime Text supports replacement of line breaks, but you have to select "regular expression" (Alt+R) and you have to enter the line break correctly (\n, not /r).
The most useful method if find and replace. (Ctrl+H)
However, another possibility is the multiple selection as in the example number one of the official website: https://www.sublimetext.com/
How it works:
You select the word you want to replace, press Ctrl+D (which will select the same word with the same name). Continue pressing Ctrl+D until you selected every word you want to replace.
Once it is done, you will have a multiple selection, which means that every character will be write at each word selected position.
I invite you to check the example on their website, it is a very good illustration.
You can use Kate, it is fine replacement for Notepad++.
Kate "Search and Replace" feature is very powerful.

Vim: How to exclude already typed result from CTRL+N autocomplete

I've searched the manual, but really have no idea what I'm looking for. Here's a screenshot of what happens when I'm typing a word and press CTRL+N to autocomplete it:
I obviously do not want to autocomplete the word I just typed as it's already typed, therefore don't need it to show in the results dropdown.
It doesn't show up every time I use CTRL+N, which is odd.
The controlN autocompletes with words starting
with the keyword at your curson position, starting the search forward
(think of N as "next). And in your case, you do have a word
right on the same line that is requiredF, which was found by the auto
complete.
If your desired keyword is before your cursor, you can use the
similar command controlP which does the search
backwards, thus searching for the previous possible completion. This
is the most common command you will use when you're writing new text,
for example.

searching in vim editor

this is a simple query about the searching in vim editor.
consider that i searched for a string like "str" with
/str
now after this search i wanted to search for "strcat" like
/strcat
but, the point in here is that i dont want to type entire /str again.... just wanted to add the new text to /str. that is when we made the first search we type /str and for the second search i just wanted to type cat for searching the entire /strcat.
can any of you vi guru's tell me if it is possible for us to do some search like this in vi.
thanks in advance
The / key begins a search string. up arrow recalls the previous line(s). Therefore,
/ up-arrow cat
will resume your search.
Besides up-arrow to get the previous search, you can also do /^f to be able to fully edit many previous searches. (That's / followed by Ctrl+F). Put the cursor on the previous search that you want to edit, edit it, and hit return.
Others have answered the question you asked, but on the off chance that incremental search would better suit your workflow, I thought I would mention it.
If you're only searching once and finding out that what you're searching for is not unique enough and you need to add more characters, incremental search will show you that before you press enter.
Put the following in your .vimrc to enable incremental search:
set incsearch

How select the rest of the word in incremental search in Intellij IDEA?

When in incremental search mode in Intellij IDEA, is there a way to select the rest of the word. For example, suppose I want to find the word “handleReservationGranted”. I type Ctrl-f to enter incremental search mode, and start typing the letters “han”. Now suppose I have found the beginning of “handleReservationGranted”. In my search box I have “han”, but I would now like to be able to select the rest of the word, so that the search box contains “handleReservationGranted” instead of “han”.
In Xemacs, I can type Ctrl-s, type “han”, and then type Ctrl-w. Now my search term is “handleReservationGranted”, and not “han”. So now if I press Ctrl-s, I find the next occurrence of “handleReservationGranted”.
Is there a similar feature in Intellij IDEA? The best I can do now is either to keep typing in the rest of the letters (dleReservationGranted), or exit incremental search, select the word with Ctrl-W, then enter search again with Ctrl-f.
I am using Intellij IDEA 7.0.3.
Yes, you can use autocomplete during an incremental search.
After you type "han", press CTRL-SPACE (autocomplete) and it will give you a list of potential matches in the file. Just pick "handleReservationsGranted" from the list and that will become your search term.

Resources