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?

4
  • As an aside: There is no vertico tag yet, and I don't have enough reputation on this stackexchange to create one. Nov 16, 2021 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, 2021 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, 2021 at 16:20
  • Incidentally there is currently an active discussion about Activating vertico on demand (though still in the minibuffer) that you may find relevant.
    – nega
    Nov 16, 2021 at 20:44

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.