Issues with shortcut for creating a link
CompletedHello,
I used to use nvALT and had lots of notes containing links which, when opened in nvUltra are no longer clickable. Since the links were 'smart links' rather than created using markdown syntax, I understand from another post on the forum that's something in Apple's code, and not something you can change.
To work around this, I tried selecting the text of the link and clicking command+K to see if it would turn into a link. The did indeed introduce markdown syntax, but not in the way that I would have expected. We get square brackets around the link text followed by empty parentheses. This isn't clickable either in the .txt/.md file or the preview. Plus, I then have to copy the link text inside the square brackets into the parentheses.
Would it be possible to adjust the behaviour of command+K on a link to put the selected text inside the parentheses as then it becomes clickable and it leaves it up to the user discretion what text they want in the square brackets. I appreciate that doing it this way means that unless the user does fill in the square brackets, then no text for the link appears in the preview, so perhaps the current behaviour is a design choice to avoid that.
Alternatively, is it possible to have the command+K behaviour put the text of the link inside both sets of brackets? Or have it wrap the link in <>?
(Apologies if this has been address elsewhere on the forum. I did search it, but could have missed something relevant).
-
If you want to wrap text in `<...>`, make sure smart pairs are enabled, and then select the desired URL. Type `<` and you're done. You don't need Cmd-K for that.
The Cmd-K shortcut should *not* put the URL inside both the brackets and parentheses, as that would be redundant (`[foo](foo)`). The better way, as you mention, is `<foo>`. The Cmd-K shortcut is designed for allowing you to create a link with separate text for the link, e.g. `[foo](this is a link)`. Which, by the way, is what happens if you have a link on the the clipboard, and then paste it while selecting plain text in the editor.
0
Please sign in to leave a comment.
Comments
1 comment