什么是“降价的片段链接导航"?在Visual Studio代码中? [英] What is "fragment link navigation for Markdown" in Visual Studio Code?

查看:90
本文介绍了什么是“降价的片段链接导航"?在Visual Studio代码中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio Code的2017年2月(版本1.10)发行说明描述了他们称为"Markdown的片段链接导航"的内容.这是说明:

The February 2017 (version 1.10) release notes for Visual Studio Code describes something they call "Fragment link navigation for Markdown." Here is the description:

包含片段的Markdown文件的链接现在将尝试在相应的标题处打开文件:

"Links to Markdown files that include a fragment will now try to open the file at the corresponding header:

* [Section](#_header)
* [Another file](./other_file#_header)

# Header
...

这允许直接在VS Code编辑器中快速浏览文档."

This allows quickly navigating documentation directly within the VS Code editor."

我已经搜索了有关此主题的更多信息,但未找到任何内容. Markdown中的碎片?我不知道那是可能的.有人可以向我指出更多信息吗?

I've searched for any more information on this topic but haven't found anything. Fragments in Markdown? I didn't know that was possible. Can someone point me to more information?

推荐答案

我实现了此功能.对不起,文档不清楚

I implemented this feature. Sorry for the unclear documentation

在1.9中,我们添加了对Markdown编辑器中链接上的 ctrl click 的支持,以打开相应的文档.

In 1.9, we added support for ctrlclick on links in the markdown editor to open the corresponding document.

Ctrl clicking [this link destination](./other_file.md) will open `other_file.md` in the editor

1.10添加了对导航到当前markdown文件中特定标题的支持

1.10 added support for navigating to a specific header in the current markdown file

Ctrl clicking [this link destination](#header) will scroll to # Header

... 

# Header

您还可以在各个文件中使用它:

You can also use this across files:

Ctrl clicking [this link destination](./other-file.md#header) will open `other-file.md` and scroll to `#header`

这允许在编辑器中完全导航基于markdown的文档.这是实际使用的功能:

This allows navigating markdown based documentation entirely within the editor. Here's the feature in action:

如果您遇到任何错误或对VSCode markdown支持有任何功能建议,请告知我们:

If you run into any bugs or have any feature suggestions for VSCode markdown support, please let us know: https://github.com/Microsoft/vscode/issues/new

这篇关于什么是“降价的片段链接导航"?在Visual Studio代码中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆