Skip to main content
added 392 characters in body
Source Link
glucas
  • 20.9k
  • 1
  • 56
  • 84

Ivy supports multiple actions for the selected candidate. You can add your own actions, but by default there is a copy action that may be exactly what you need.

With the default key bindings, you can use M-o in the minibuffer to bring up the ivy action menu, and w to copy the currently selected candidate.

EDIT

I see this does not quite address your use case, since the current file name is not the default candidate for find-file when ivy is enabled. I always used to use find-alternate-file (C-x C-v) as a quick way to grab the current file name, and this works fine with ivy using M-o w as noted above. (Now I just have a separate key binding to copy buffer-file-name directly.)

Ivy supports multiple actions for the selected candidate. You can add your own actions, but by default there is a copy action that may be exactly what you need.

With the default key bindings, you can use M-o in the minibuffer to bring up the ivy action menu, and w to copy the currently selected candidate.

Ivy supports multiple actions for the selected candidate. You can add your own actions, but by default there is a copy action that may be exactly what you need.

With the default key bindings, you can use M-o in the minibuffer to bring up the ivy action menu, and w to copy the currently selected candidate.

EDIT

I see this does not quite address your use case, since the current file name is not the default candidate for find-file when ivy is enabled. I always used to use find-alternate-file (C-x C-v) as a quick way to grab the current file name, and this works fine with ivy using M-o w as noted above. (Now I just have a separate key binding to copy buffer-file-name directly.)

Source Link
glucas
  • 20.9k
  • 1
  • 56
  • 84

Ivy supports multiple actions for the selected candidate. You can add your own actions, but by default there is a copy action that may be exactly what you need.

With the default key bindings, you can use M-o in the minibuffer to bring up the ivy action menu, and w to copy the currently selected candidate.