Ivy Find File and Open in a New Window
Published on Oct 5, 2021, by Junji Zhi
Sometimes we find a file but don’t want to interrupt the work in progress in the current window. It is best to open it in a new window (or frame, in Emacs term).
If you are using Ivy / Counsel / Swiper, try the below workflow:
M-x counsel-find-file, or typeC-x C-f- Fill out the file name with the help of auto-completion (Tip: Use
M-ito complete the name without jumping to it) - Press the Hydra key
C-oto open the Hydra menu - Press
fto open in another frame. Voila!
Bonus: There are other actions available in the Hydra menu, like copying the file path, mkdir, deleting file, etc.
Basically if we want to do any file related action, simply type C-x C-f and wire up the action as we need.
It’s neat!
Demo:
