How do I change the default search location in Find (command-shift-F) for TextMate2? Right now it defaults to my home directory (which is almost never what I want), and I'd like it to search only the current files (as if you click the drop-down menu and select "Open Files") or projectDirectory.
Use this little arrow on the File Browser drawer to access the pictured menu, then select Use "____" as Project Folder. After that, Command+Shift+F should have this directory selected in the Find dialog.
Related
I am using Sublime Text editor and I need to change the settings for Sublime 3 to open files that start with a dot like .gitignore. Please let me know where in the settings I need to make the change. I am using Windows OS fyi.
This isn't a Sublime-specific option, but an operating system one, as the OS determines what is displayed in file dialogs as well as the file system explorer. To set the option on Windows, first open Windows Explorer and navigate to the folder containing the dotfile you want to view. Then, in the View tab, click the Options button on the far right, then select Change folder and search options.
You can also find Options under the File menu.
The Options window will now pop up. Select the View tab, then select the option Show hidden files, folders, and drives. Next, click on the Apply to Folders button at the top.
Similar options are also available on macOS and Linux.
I have some string elements in the strings.xml file of my android project and I want to change their name in the strings.xml file and everywhere else where they were used.
Is there a way to do this in android studio without having to go through each file manually to edit the names?
Right click the name in 'strings.xml'
Select 'Refactor' option
Select 'Rename' option
Edit the name and hit 'Refactor'
As a shortcut, you can change the name of an XML element, this way:
Select the XML's name (or XML's file in the left panel),
press SHIFT+F6 (or FN+SHIFT+F6 on MacOS),
change the name (in the opened box),
click refactor.
One code directory is from a long working library, but the code inspector complains about many issues in it. How do I exclude it from analysis?
I've tried looking at the settings, and also tried right clicking on various things through the analysis.
I'd like the code inspection to work for most of my project, but not from parts of it that work and analysis is unneeded. In this case, it is a complex open source C language library where I do not want to touch the code.
Okay - I feel a bit dumb, but so others don't have to go through this, here are details. Also, it is very easy to screw this up - the Android Studio GUI will let you do stuff that looks good in the dialog, but doesn't work. It took me several tries to find the magic that works.
Here is the procedure:
From the main menu, select "Analyze" then "Inspect Code"
Click the button next to "Custom Scope"
Click the three dots button - to the right on the same line. A new dialog will pop up.
Click the plus ( + ) - upper left, to start a new Custom scope
Give it a name
Select "Local" or "Remote"
In the drop-down of the new dialog, select Project view
Of the four icons, click them until only the one for file display is emphasized
Find the top directory of what you want to analyze, and click "Include"
Find each directory you want to exclude, and click "Exclude" for each
Click OK - the custom scope dialog will close
Click OK - the analysis will run
In the future, that scope is available by name, but remember that it does not honor the implied scope if you right-click a directory in the hierarchy.
I am in the process of trying to add a main menu to my app.
From the google docs:
To define the menu, create an XML file inside your project's res/menu/ directory and build the menu with the following elements:
I created a "menu" file in the /res folder. However it didn't appear even though trying to create a new "menu" folder resulted in an error, meaning it exists but does not appear in "android" view.
So according to this answer I changed to packages view to see my newly created menu directory.
I tried to create a new resource file in my menu directory. Then this happens:
I am currently stuck.
change to android view then right click res folder -> select new android resource file. see then window will show, select "Resource Type" to MENU and input file name then it will automatically create the parent MENU folder and menu resource file. see
the menu that you haved created under res should start with capital letter. menu not Menu
When I used Command+Shift+O search file in my AndroidStudio for Mac.The result will has too many unnecessary files like in "build" folder. I've never seen before until recently.How can I exclude these?
Android Studio (like its progenitor IntelliJ) allows you to define a
custom scope to help you exclude intermediates files when searching.
Here are the steps I use to set this up:
Bring up Find in Path dialog (Ctrl+Shift+F on my machine).
In the Scope area, select the Custom radio button. Then tap the "..." button on the right side of the dropdown. This brings up the
Scopes dialog.
Click the "+" button on the left side of the Scopes dialog, which will bring up the Add New Scope dialog. Name it
"ExcludeIntermediates".
In the Pattern field, paste in the following pattern and click OK:
!file:*intermediates*/&&!file:*generated*/
This pattern excludes R.java files and other intermediates such as
layout files in exploded-aar and AndroidManifest.xml copies in
filtered_manifests folders.
https://stackoverflow.com/a/32238593/1815624