How to ignore a directory in Developer tools (F12) search panel (Ctrl+Shift+F)? - devtools

I would like to ignore the directory "node_modules" from the web inspector "Search all files" results. Is there something like "unmapping" sub-folders?
I know there is has a "Regular expression" checkbox, but it only filters the file content, not it's path.
So the question is: How can I permanently ignore a folder from devtools search?

Devtools > Settings > Workspaces > Excluded Folders > Add (at the right)
IMPORTANT: You will need to close and reopen the devtool window to make this work.

Related

What do I do to make Sublime text stop ignoring filenames that start with a dot

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.

Setting PYTHONPATH in PyCharm per project [duplicate]

I have a directory that I use for my PYTHONPATH: c:\test\my\scripts\. In this directory, I have some modules I import. It works well in my Python shell.
How do I add this directory path to PyCharm, so I can import what is in that directory?
Out of data, see Duane's answer below.
You need to go to the Main PyCharm Preferences, which will open up a separate window. In the left pane, choose Project:... > Project Interpreter. Now, in the main pane on the right, click the settings symbol (gear symbol) next to the field for "Project Interpreter". Choose More or Show All in the menu that pops up. Now in the final step, pick the interpreter you are using for this project and click on the tree symbol at the bottom of the window (hovering over the symbol reveals it as "Show paths for the selected interpreter"). Add your path by click in the "plus" symbol.
It took me ages to find, so I hope the detailed instructions will help. Further details are available in the PyCharm docs.
It is good practice to have __init__.py in each subfolder of the module you are looking to add, as well as making your project folder a 'Source Root'. Simply right-click on the folder in the path bar and choose 'Mark Directory as ...'
For Pycharm Community 2019.3
File
Settings
Project
Project Interpreter
Cog in top right => Show all
Select the interpreter
On the right toolbar, there are 5 icons, bottom one looks like a folder tree, click it
Press plus +
Select directory, press OK
In PyCharm Community 2019.2/2019.3 (and probably other versions), you can simply:
right-click any folder in your project
select "Mark Directory As"
select "Sources Root"
Modules within that folder will now be available for import. Any number of folders can be so marked.
The following answer is for PyCharm 2022.1.3+ (Professional Edition).
Open up Preferences (mac: ⌘ + ,)
Click on Project and then Project Interpreter
Click on the three vertical dots and the on Show All...
Choose your interpreter and then click on the directory structure icon
Click on the + icon and add the path you need to add to PYTHONPATH.
That's it!
enter image description here
you can go to setting in pycharm
and set interpreter python

Textmate2 default search location

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.

What happened to "Exclude from Source Control" in VS2012

I want to exclude some of the files in code folders from TFS 2012 source control.
Before VS2012 this was done by the "Exclude from source control" command available in "Source Control Explorer"s right-click menu. But in VS2012 I can not find it.
Does anybody know where it is ?
(I am using a "Local" workspace by the way.)
When you click on "Detected Changes" in the Team Explorer pane, "Promote Candidate Changes" window opens. This window allows you to select among detected changes and promote them to a source controlled item.
In this "Promote Candidate Changes" window, you select a file (or multi select files with Shift), right-click on it and a context menu pops up which contains an "ignore this local item" option. If you you click on it, selected files are excluded from source control.
Visual Studio adds a file named ".tfignore" to the source control mapping root, which contains names of all files to be ignored by source control. (Previous TFS versions did not produce this file but they were all server workspaces. Since this is a "Local" workspace, filenames to be ignores need to be kept in the workspace)
I have the real solution.
In the "team explorer" pane, in the "pending changes" tab, right click a new file you don't want in source control, and click "undo".
It will leave the file in the project, and exclude it from TFS. In the project window, the file will never have a "lock" icon on the left of its name.
This is the easiest solution:
1. Select the file(s) in Solution Explorer
2. Go to File -> Source Control -> Advanced
and here it is
Keep in mind:
If you right click a file in Solution Explorer you only find "the most important options" not all :)
In VS2013 this is back but has been moved to the file menu: -
Select the file in the Solution Explorer
File > Source Control > Advanced > Exclude xxx.xxx from Source Control
I know that this is slightly off topic but thought it may help someone.
I have Visual Studio 2017 Enterprise, and the option to exclude does not exist under File->Source Control. My solution to this problem was to open the Source Control Explorer, and remove the item I wanted to exclude.
It's in the Pending Changes pane separated to Excluded Changes and Included Changes sections. It allows filtering and excluding or promoting items between sections.
!

Add an already existing directory to a directory in Solution Explorer

I want to add an already existing directory to a directory in Solution Explorer, but whenever I right-click on the directory and select Add => Existing Item, I can only add individual files, but not directories.
How do I add an already existing directory to a directory inside a Project inside Solution Explorer?
Click the 'Show all files' button at the top of the Solution Explorer and right click the folder desired and select 'include in project'.
Drag and drop the folder from Windows Explorer onto your Visual Studio solution window :)
Source here
or simply copy & paste into solution explorer.
VS 2012 seems to distinguish between 'Solution Folders', which are only folders containing either other solution folders, or containing project folders. The drag-and-drop works (with my settings) only for the project folders, and no for the solution folders.
If I add a new solution folder, nothing happens on the machine. If I drag-and-drop a machine folder to the main Solution, it refuses to accept it. If I drag-and-drop the folder to a Solution Folder, I get an error message saying this cannot be done.
Some other answers are missing an important point: if the folder is not in a project in the solution it is impossible to add the folder
This is the solution:
1) Add a new folder to the sln - it does not care that the folder already exists on the disk because this a virtual folder in the sln
2) Add the file to the folder using "add existing files"
When dealing with a solution level folder that has been removed for some reason, and now needs to be added back, open the .sln file in a text editor like notepad++.
Find your "FolderName" in the section that looks like this...
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NewFolder1", "NewFolder1", "{73ED84FC-F250-4CCC-B267-34CEB67F2883}"
EndProject
Delete from "Project" to "EndProject" ONLY for the specific Project/Folder you're having trouble with.
You may get a message in VS2012 that says your solution has been modified by an external source. Choose the option to "Discard" your changes for the external changes. Lastly, add your solution level folder, and add your project(s) to that folder as existing items, drag/drop them, or copy and paste them, according to your preference.
For those who had a hunch it could be done but weren't able to do it, NOTE: Drag Folder or Files ONTO the name of the Project Name in Solution Explorer in the least
Expand the "Project" item in the menu bar and select "Show All Files". Then locate the folder you wish to add in the Solution Explorer (folders that are not currently included will be light grey with a dotted outline instead of the usual solid icon) right click the desired folder and select "Include in project"
Once finished select "Show All Files" from the Project menu again to return to the regular view.
(This is very similar to Radenko Zec's answer, but does not require the "Show All Files" button to already be present in a toolbar. I would just leave this as a response to his answer, but I don't currently have the reputation to leave comments.)

Resources