1

I have recently switched from ivy to vertico for the file completion menu system (the new default in doom). Sometimes I want to insert the full path to a file into the current buffer (for example inserting an image into an org or latex file), and instead of "blindly" typing the whole path, I would like to search the path in vertico and then insert it into the buffer.

With ivy, I was able to bring up ivy, search the path and pressing meta-o i, but I haven't found anything similar in vertico. Does anybody have any ideas?

Drew
  • 75,699
  • 9
  • 109
  • 225
  • As an aside: There is no `vertico` tag yet, and I don't have enough reputation on this stackexchange to create one. – Romeo Valentin Nov 16 '21 at 15:21
  • You'll have to write it yourself, most likely. Notice that `M-0 M-! pwd RET` prints the working directory at point. Also, you can complete any path, in any buffer, by calling the function `hippie-expand`. These are perhaps more general and more powerful ways to achieve what you want. – aadcg Nov 16 '21 at 16:17
  • Also, nothing prevents you from doing: `C-x C-f`, hitting `M-p` and `M-n` to navigate the path history and copying it from the minibuffer. Now it's up to you to decided if you need interactive functions that leverage these ideas. – aadcg Nov 16 '21 at 16:20
  • Incidentally there is currently an active discussion about [Activating vertico on demand](https://github.com/minad/vertico/issues/149) (though still in the minibuffer) that you may find relevant. – nega Nov 16 '21 at 20:44

1 Answers1

0

I've solved the issue using embark-act. Now, I can search for something, and when I have the path in the vertico buffer I run M-x embark-act i and it inserts the path as I was hoping for.