microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.44k stars 28.62k forks source link

Allow me to search for markdown headers without manually inserting `-` delimiters #174999

Open joyceerhl opened 1 year ago

joyceerhl commented 1 year ago

Testing #174884

Currently if I have a header like so

# A header with spaces in the title

I have to search for it by typing the following when triggering header autocomplete

#a-header-with-spaces-in-the-title

I'd like to be able to type

#a header with spaces in the title

and have the completion still show up.

mjbvz commented 1 year ago

I agree but am not yet sure if this belongs in the suggest widget or a new UI. Using the suggest widget is a little weird because the inserted text has to be slugified, whereas you are searching based on the original header

I'm potentially imagining a Insert header link command that shows a quick pick with all headers for fuzzy matching. Selecting one would insert the full link, similar to how Markdown: Insert link to file in workspace works