Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking visually selected text to an existing zettel #125

Open
RhvdG opened this issue Jun 20, 2022 · 3 comments
Open

Linking visually selected text to an existing zettel #125

RhvdG opened this issue Jun 20, 2022 · 3 comments

Comments

@RhvdG
Copy link

RhvdG commented Jun 20, 2022

Perhaps I am overlooking something, but it seems there is at present no way to link visually selected text to an existing zettel. Is that correct?

Say I have a zettel Major_Tom-344.md that has as its title "Major Tom", but now I want to link to it from the words "Ground Control". Currently there seems to be no faster way to achieve this then inserting the link using the [[ command, and then editing the title part, leaving the filename untouched. I would like to be able to select "Ground Control" and then hit, perhaps, <leader>[[ to pick a filename to link to.

@michal-h21
Copy link
Owner

Good idea, thanks. It is now possible to use [[ with a visual selection, and it will use the selected text as a title.

@RhvdG
Copy link
Author

RhvdG commented Jun 22, 2022

Thanks for adopting this idea! Unfortunately, it doesn't work for me. I updated the plugin, quit and relaunched MacVim, and though the help file now refers to the new feature, visually selecting a word and hitting [[ just results in Vim beeping.

And I just noticed that typing [[ in insert mode has stopped working. This used to work normally. It now stops on the second bracket and switches to normal mode, and beeps.

Let me know if I can help solve this (as as user, I'm not a coder).

@michal-h21
Copy link
Owner

That's strange! I don't have access to Mac, so I cannot test it, but it works well for me in terminal Vim and Gvim. Could you please send me your config file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants