Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)
like image 760
Yohei Avatar asked Feb 13 '19 00:02

Yohei


Video Answer


2 Answers

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.

like image 197
Kana00 Avatar answered Oct 11 '22 07:10

Kana00


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

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

  • from Commit: Add basic markdown link completions

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

like image 1
Mark Avatar answered Oct 11 '22 06:10

Mark