tamuhey
tamuhey

Reputation: 3525

Markdown file path complete in VSCode

Is there any path-autocompletion extension for Markdown in VSCode?

I tried Path Intellisense but this seems to be effective only when using (double) quotation.

I want to use autocompletion when insert images stored in local directory, e.g.:

![](./img/local-img-file.png)

Upvotes: 5

Views: 2162

Answers (3)

Mark
Mark

Reputation: 180641

It should be built-in to vscode soon, hopefully v1.64.

New setting: markdown.suggest.paths.enabled default is true

Only normal links for now. Will add reference links later. Should support the forms:

  • [](dir/file.md)
  • [](./dir/file.md)
  • [](/root-dir/file.md)
  • [](#header)
  • [](./dir/file.md#header)

The paths suggestions work similarly to path IntelliSense in CSS and HTML files. Paths starting with / are resolved relative to the current workspace, while paths staring with ./ or without any prefix are resolved relative to the current file. Path suggestions are automatically shown when you type / or can be manually invoked by using kb(editor.action.triggerSuggest).

Path IntelliSense can also help you link to headers within the current file or within another Markdown file. Start the path with # to see completions for all the headers in the file (depending on your settings, you may need to use kb(editor.action.triggerSuggest) to see these)

-from https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_64.md#markdown-path-intellisense

Upvotes: 2

Franey
Franey

Reputation: 4354

For anyone else stumbling upon this answer, the Markdown All in One extension is able to perform this sort of autocomplete.

Upvotes: 0

Kana00
Kana00

Reputation: 66

Yes, you can make that happen by using this extension on VS Code.

Relative Path extension

Juste type ctrl (or cmd on mac) + shift + H and type your file name.

Upvotes: 5

Related Questions