60

Has VS Code an autocomplete function for file paths? For e.g. if I want to write the full path to js: "assets/libs/jquery.min.js" Editors like Brackets.ie does this by default.

2
  • I'm hoping they add this, it doesn't come up with suggestions as I type and it's not super necessary, but would be cool. The main reason for using VS code over something like Sublime Text is that a lot of stuff is setup by default and appears to have good debugging built in for Node.JS apps. I may end up switching back to sublime though and just configuring it Commented Apr 3, 2016 at 4:58
  • Neither Path Intellisense nor Path Autocomplete work for me at all. They literally do nothing, though I've tried to follow the instructions in the READMEs. No idea what I'm doing wrong. Would love a reliable answer to this question. It's weird to be in a text editor that doesn't grok file paths. Commented Aug 30, 2024 at 12:38

2 Answers 2

77

Visual code by itself has no Path intellisense, but you can use this plugin.

press f1 and copy this in it: ext install path-intellisense

Its a plug-in made by Christian Kohler, all props to him.

Plus, as Searene mentions in the comments, you may also want to set "path-intellisense.absolutePathToWorkspace": false in User Settings to make the auto-completion of absolute paths work.

Sign up to request clarification or add additional context in comments.

4 Comments

it doesn't recognize tilde (~) as root directory
You may also want to set "path-intellisense.absolutePathToWorkspace": false in User Settings to make the auto-completion of absolute paths work.
I think @Searene's comment should be added to the answer.
I do think this functionality has been integrated into VS Code. This works for me, with ~, out of the box.
14

Path Intellisense does not work for me, but Path Autocomplete works for me.

Installation:

Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install ionutvmi.path-autocomplete

You can also install it in the extensions tab(Ctrl+Shift+X).

2 Comments

same with me. Path intellisense always show paths from root workspace when I press "../". Path autocomplete works very well.
you may need to add "typescript.suggest.paths": false and "javascript.suggest.paths": false in vscode settings. did and works perfectly fine!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.