Reputation: 315
When one searches or uses the Goto file (Quick open) command (cmd+P), the search automatically includes everything from symlink folders. This makes the quick open useless if there are a lot of symlink folders.
Is there a way to exclude the symlinks? Or is this a feature request?
PS:
In project search, one can forcefully exclude paths, so I exclude the big symlink folders, but it's manual, not persistent, and it still does not affect ctrl+P.
Upvotes: 18
Views: 6147
Reputation: 182241
There is a setting that will disable search from following symlinks. Disable:
Search: Follow Symlinks
Upvotes: 17
Reputation: 625
I would love to know if anyone has a better solution to this. I use my terminal to open VSCode so my solution was to use a bash function to open vscode with the realpath of the directory like this:
function vscr() {
python -c "import os,sys; target=os.path.realpath(os.path.expanduser(sys.argv[1])); os.execv('/usr/local/bin/code', ['', target])" "$1"
}
so effectively vscr <symlink>
expands to code <realpath>
Upvotes: 0