How to exclude words from project search in Atom editor? - search

I press Shift + CMD + F in my Atom Editor (on OS X) to search for the term "aria" within all files of my project.
Now I also get search results for "Variant" which is not what I want, so I want to exclude the word variant from my search.
How would I do that?

Try using the "whole word" option (ctr + alt + w, or click on the button on the far right in the project search options)

Related

vscode navigate search editor using keyboard only

Is there any way to navigate the search editor (whole workspace search) using only cursor keys in vscode ? I'm talking about the whole workspace search and not just the find/replace search.
The new search editor thankfully has ported over most of the shortcut commands you have grown to know, but for brevity, this answer will include only the default keybinds with respective command id.
The when expression most commonly associated with these keybinds, should you want to alter them, are :
inSearchEditor
hasSearchResult
searchInputBoxFocus
Searching
Context Lines
Toggle context lines : toggleSearchEditorContextLines ALT + L
Will show n lines before or after search result, for context
Reduce context line quantity : decreaseSearchEditorContextLines ALT + -
Increase context line quantity : increaseSearchEditorContextLines ALT + =
Query Details
Toggle Query Details : workbench.action.search.toggleQueryDetails
This will toggle the include/exclude file input boxes
Settings
Toggle Match Case : toggleSearchCaseSensitive ALT + C
Toggle Regex : toggleSearchEditorRegex ALT + R
Toggle Word Match : toggleSearchEditorWholeWord ALT + W
Navigation
Luckily, because the search editor is effectively an 'editor', you can continue to use all the keybinds that you are used to. So, in order to jump straight to the editor, you can use whatever your keybind is to jump to an editor group, default is: CTRL + 1 (commandId: workbench.action.focusFirstEditorGroup)
Navigating matches
Go to next match : search.action.focusNextSearchResult F4
Go to previous match : search.action.focusPreviousSearchResult SHIFT + F4
Select all matches : selectAllSearchEditorMatches CTRL + SHIFT + L
Results
Deleting result block : workbench.action.searchEditor.deleteResultBlock CTRL + SHIFT + BACKSPACE
This deletes a block of results from the editor
For example, in the picture below, if my cursor is anywhere in the 'convert.js' result block the entire convert.js matches would be removed. You can undo this with CTRL + Z
Go To Definition (effectively go to file)
You can peek with ALT + F12 when your cursor is anywhere on the file name
You can assign a keyboard shortcut to follow links for the commandId: editor.action.openLink for when your cursor is on the file name
You can go directly to the file & line number of the search result using F12 while your cursor is anywhere on that result
Navigate Back to Input Box
Focus Search Input Box From Results: search.action.focusQueryEditorWidget ESCAPE
Searching within Search Editor
As noted, the search editor is effectively an editor, so you can resume using CTRL + F (find) or CTRL + H (find/replace) to narrow down results even more, and the keybinds set for those are maintained as used elsewhere.
Miscellaneous
Search again: rerunSearchEditorSearch CTRL + SHIFT + R
Perhaps you deleted too many result blocks
Otherwise, while your cursor is actively in the editor (results), you have the freedom to use most of your keybinds per normal, including collapsing/folding, jumping, copying, moving to editor groups etc

IntelliJ / Android Studio - Replace all as refactor

I want to change (Replace All - ctrl + R) text occurrences at the same time refactoring it. Is it possible? Something like: (ctrl + R) + (shift + f6)
Use "Replace in Path" (Ctrl + Shift + R).
It works as simple Replace All in whole project. That means in some scenarios (check my comment to CrazyCoder) we have to use it few times (e.q. one time on resources files, the second time on code files).

'Find All' in Android Studio

New to Android Studio and I wanted to find all instances of something across all java files. I read that shift+shift would bring up a 'Search Everywhere' box but it doesn't work. You can see from the image below that the text is in the open class and it says 'Nothing Found'. Am I missing something?
Greg
Try using Ctrl + Shift + F.
You can also try Ctrl + Shift + R.
In Android Studio: version-1.3.1 -- for MAC
Do the following for finding anything in the project:
command + shift + F
Do the following for finding anything and then Replacing in the project:
command + shift + R.
shift+shift is used for searching Classes, Files, Symbols, Actions[About] but not for searching in source files
To find something in code use
//global
Edit -> Find -> Find in Path...
//or
Command + Shift + F
//local
Edit -> Find -> Find...
//or
Command + F
For me I just wanted to find lines where a particular word was used:
so for that Shortcut: (Mac: cmnd+F /).

Search all the occurrences of a string in the entire project in Android Studio

I've just started using Android Studio (IntelliJ), and I now look for the feature to find the occurrence of a string in any of the files in my project. For example: I want to find all the files that contain the string ".getUuid()"
The search at the top right doesn't give me the correct results, and I don't think I can find this feature under Edit > Find.
Could anybody point me at the right direction?
TLDR: ⌃⇧F on MacOS will open "Find in path" dialog.
First of all, this IDEA has a nice "Find Usages" command. It can be found in the context menu, when the cursor is on some field, method, etc.
It's context-aware, and as far as I know, is the best way to find class, method or field usage.
Alternatively, you can use the
Edit > Find > Find in path…
dialog, which allows you to search the whole workspace.
Also in IDEA 13 there is an awesome "Search Everywhere" option, by default called by double Shift. It allows you to search in project, files, classes, settings, and so on.
Also you can search from Project Structure dialog with "Find in Path…". Just call it by right mouse button on concrete directory and the search will be scoped, only inside that directory and it's sub-directory.
Enjoy!
In Android Studio on a Windows, macOS or Linux based machine use shortcut Ctrl + Shift + F to search any string in whole project. It's easy to remember considering Ctrl + F is used to search in the current file. So just press the Shift as well.
Press Shift twice and a Search Everywhere dialog will appear.
Use Ctrl + Shift + F combination for Windows and Linux to search everywhere, it shows preview also.
Use Ctrl + F combination for Windows and Linux to search in current file.
Use Shift + Shift (Double Tap Shift) combination for Windows and Linux to search Project File of Project.
You can open the Find in Path dialog by pressing:
Ctrl + Shift + F
Android Studio 3.3 seems to have changed the shortcut to search for all references (find in path) on macOS.
In order to do that you should use Ctrl + Shift + F now (instead of Command + Shift + F as wrote on the previous answers):
UPDATE
To replace in path just use Ctrl + Shift + R.
Android Studio Version 4.0.1 on Mac combination is for me:
Shift + Control + F
And for all of us who use Eclipse keymaps the shortcut is Ctrl+H. Expect limited options compared to eclipse or you will be disappointed.
In Android Studio on a Windows or Linux based machine use shortcut Ctrl + Shift + R to search and replace any string in the whole project.
What you want to reach is that, I believe:
cmd + O for classes.
cmd + shift + O for files.
cmd + alt + O for symbols. "wonderful shortcut!"
Besides shift + cmd + f for find in path && double shift to search anywhere.
Play with those and you will know what satisfy your need.
use ctrl + shift + f on windows
Press SHIFT 2 times and you can search Every-where , both Class and Method() in the project.
Ctrl + N for finding only Class name.
Ctrl + E for Recent Files.
Use Ctrl + Alt + F combination in Ubuntu.
On a mac use shift + cmmd + f
To get rid of the screen press esc
I use IntelliJ IDEA
version: 2019.2.3 (Community Edition)
Build #IC-192.6817.14, built on September 24, 2019
Runtime version: 11.0.4+10-b304.69 x86_64
In Android 3.6 on a Mac if you want to export the results to a text file then do the following
Command+Shift+F then enter the text you want to search
Then on Bottom Right click on "Open In Find Window"
Then Right Click On Found Occurrences
Then Export To Text File
Once in text file you can find and replace to remove, sort lines etc... please see screenshots for assistance.

Sublime code-like method browser in Vim

Sublime code has a shortcut Super-R which opens a method browser listing all methods in current class (Ruby). Is there a plugin to get similar functionality in Vim?
"/def " or "m]" work only if you're familiar with the class and know what method you want to go to, whereas Super+R works for just exploring a class.
The TagList plugin is another (very popular) option. There are a bunch of others.
FYI, /def and m] are not the equivalent of Sublime Text's Ctrl+R. That would be :tag foo which you can tab-complete if you don't know all the names of your methods.
While we are at it, the CtrlP plugin has a feature very similar to Sublime Text's Ctrl+R: :CtrlpBufTag that I use hundreds of times a day.
All of these methods depend on the presence of a tags file generated by Exuberant Ctags or some compatible program. Actually, tags are quite an important part of the Vim experience.
You can use my project https://github.com/fatih/subvim
For cmd+r you can directly jump to any definition on the fly. No need to genarete tags or whatever. Currently any language supported by ctags can use this feature. I've also add languages like Go, Coffeescript, Objective-C,etc... It means just fire it up.
Also it has Sublime-like features backed in (means no plugins necessary). Thus you can use the following shortcuts:
cmd + p -> go to anything
cmd + t -> go to file
cmd + r -> go to symbol
cmd + k -> show side bar
cmd + / -> toggle comment
cmd + [ -> indent
cmd + ] -> unindent
cmd + <number> -> jump to tab 1, tab 2, ...
cmd + alt + left -> move to next tab
cmd + alt + right -> move to previos tab
cmd + z -> undo
cmd + shift + z -> redo
cmd + s -> save file
cmd + w -> close
cmd + f -> search
Also autocompletion, restoring latest session, automatic bracket closing and many minor changes make it really a joy to use.
The tagbar plugin works pretty well with Ruby files. Perhaps its not exactly the same as Sublime Super-R but it does give you a quick and easy way to explore a class.

Resources