michal-h21 / vim-zettel

VimWiki addon for managing notes according to Zettelkasten method
MIT License
555 stars 72 forks source link

Linking visually selected text to an existing zettel #125

Open RhvdG opened 2 years ago

RhvdG commented 2 years ago

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 commented 2 years ago

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

RhvdG commented 2 years ago

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 commented 2 years ago

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?