Incremental search in Idea the word under cursor - search

I would like to search in current file the word under cursor like Alt+F3, except manually selecting current word? Is there alike keyboard shortcut?

Not entirely sure what you are looking to do when you say "manually selecting current word", but F3 (Next) and Shift+F3 (previous) will search for the word under the cursor. You can use Ctrl+W (Extend selection) to select the word under the cursor. Finally Ctrl+F will open the find/search tool. More options are listed in help: https://www.jetbrains.com/help/idea/search.html
EDIT
I forgot to mention, if you first use the mouse or Ctrl+W to select the word, and then open the search bar using Ctrl+F, or search & replace using Ctrl+R, IDEA will populate the search field with the selected text.

Ctrl+F3 - Find Next
Unfortunately, I have failed to find any keyboard shortcut for Find Previous shortcut.

Related

sublime text: how to make the cursor go to the beginning of a find text

In sublime text when i find some text using regex assuming START.*END where i want to find text between START and END words.
Now after findind we see the cursor is located after the END word. Is it possible to put the cursor before START word
Or is there a keyboard shortcut which can bring the cursor to ahead of START.
Because if i do CTRL + LEFT it will take me to the next . (dot) or space etc
If i do HOME then it will go to the beginning of the line
As user #OdatNurd mention in comments, after you search and select all occurrences, press Left or Right arrow to go to beginning or end of selection.
Example:
after selecting all occurrences, press Left to go to the beginning of a selection and edit.

Multiple cursors from find result

I have a regex in my find box and want a cursor at each found location (I'm actually trying to delete a load of new lines in paragraphs but there's far to many to do by hand).
How can I get a cursor at each location that matches [\w]$?
Click the "Find All" button at the far right of the find panel, and ST will select all the matches.
The shortcut Opt + Enter should work if you're looking to stay on the keyboard.
If you want to search for a simple string, you may select it right in editor and use Find All:
Windows/Linux: Alt+F3
Mac: ⌃+⌘+G

Restore the previous highlighted chars quickly?

Is there a shortcut (or some other quick way) which could restore previous highlighted items quickly, like the one highlighted by / when hlsearch is on?
EDIT: for previous highlighted word, I mean the word highlighted by previous searches via /. 2 search commands with different words are involved here at least.
Vim saves previous searches in the search history. You can recall previous searches by pressing ↑ in the search command-line (which you enter via /). This even considers the typed prefix, so with /foo<Up>, you'll recall previous searches that started with foo.
Alternatively, you can enter the command-line window for searches with q/. There, you can use the default Vim commands to navigate, move around, and edit, and finally select an entry to search for via Enter.
gv re-selects the last visual selection
gn selects the next search match

microsoft visual studio 2012 find and replace focus to find all

When you do a search in vs 2012 via the Find and Replace (cntrl shift f) the default focus is on the Find Next. How can you set the default focus to Find All.
Because its very frustrating because it will do a very slow search on find next and I want to do a find next (just like in the prev Vs Studios)
Ctrl+Shift+F puts default focus on "Find All". So if you press Enter, you will get Find All. If you want to select "Find Next" from this box, press Alt+F while focused on this search window instead of Enter. This tip doesn't change default focus, but it does give you keyboard access to Find Next.
If you want a search box where Enter does "Find Next", try the Ctrl+F search box. In the Ctrl+F window, you could change the search scope from "Current Document" to "Entire Solution". Then the Enter key would Find Next through the entire solution.
You may also use the F3 function key as a workaround. Who in his right mind would think Enter key is for finding all matches instead of cycling through each find?

Search for selection in Vim

I use Vim and Vim plugins for Visual Studio when writing C++. Often, I find myself wanting to search for a string within a function, for example every call to object->public_member.memberfunc().
I know Vim offers a convenient way to search for a single word, by pressing * and #, and it can also search for typed strings using the ubiquitous slash / command. When trying to search for all the instances of a longer string like the one above, it takes a while to re-type after /.
Is there a way to search for the selection? For example, highlight with v, then copy with y, is there a way to paste after /? Is there an easier shortcut?
Check this Vim tip: Search for visually selected text
Or you can simply yank the selected text with y and go to search mode /, then you can paste the last yanked text with Ctrl+R 0
Answer
Yank the text you want to search for
q/p
Enter
Explanation
q/ works similarly to vanilla search / except you're in command mode so p actually does "paste" instead of typing the character p. So the above will copy the text you're searching for and paste it into a search.
For more details type :help q/
Use q / instead of just /. (Same with q :). Now you can VIM-edit through your command and search history! (Try Ctrl-N and Ctrl-P sometime).
I just learned (through the excellent book Practical Vim) that there is a plugin for that.
You can find the plugin on GitHub.
The plugin lets you search for a visual selection with * and #.
You can actually select text visually and press * and # to search for the next occurrence... It will work the same, the only caveat is that:
Whitespace in the selection matches any whitespace, when searching (searching for "hello world" will also find "hello" at the end of a line, with "world" at the start of the next line).
http://vim.wikia.com/wiki/Search_for_visually_selected_text
--> if you want to highlight a text occurrences in gvim
Select the text & copy
then ?paste the selected text (Note: This will not work for insert mode)

Resources