dendron icon indicating copy to clipboard operation
dendron copied to clipboard

Shorten link when using `Paste Link` command

Open aleksey-rowan opened this issue 3 years ago • 1 comments

Please select if your request is either something new or an enhancement

  • [x] Enhancement of an existing Feature.
  • [ ] Request of a new feature.

Please select the area your request applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

  • [ ] Workspace - VSCode workspace, vaults, Intellisense/autocomplete, Dendron settings
  • [ ] Lookup - Dendron's Lookup Command
  • [ ] Views - Dendron Preview, Tree View, Side Panels in the UI
  • [ ] Schema - Dendron Schemas
  • [ ] Pod - Data import from / export to Dendron
  • [ ] Publish - External Site Publish
  • [ ] Markdown - Markdown features, such as syntax support and features

Is your feature request related to a problem? Please describe

When inserting links to resources with long URLs, resulting links are cumbersome to use and they take up a lot of space. Like this Google Maps link:

image

Describe the solution you'd like

Dendron can uses bitly or tinyURL or another link shortening service to shorten the link into something more easy on the eyes:

image

This setting, ideally, should be configurable, so users can pick which service they want to use (or not use at all) for their link-shortening pleasure and maybe even specify which links should be shortened and which shouldn't be (based on regex match for example or the length of the link, etc.).

Describe alternatives you've considered

An alternative would to fold/collapse the URL part of the link like it's done in Typora and other editors, but inline folding doesn't seem to be possible in VSCode at the moment.

aleksey-rowan avatar Jan 09 '22 19:01 aleksey-rowan

Inline folding isn't possible but we can achieve something similar by using the custom editor api. its in our backlog. i also like the link shortener approach. thanks for suggesting

kevinslin avatar Jan 11 '22 17:01 kevinslin