2

Often i have a need to open a file from the other projectile-based project in another window. I'm using helm with projectile, so there's a function helm-projectile-switch-project (which i guess by default is bound to C-c p p). I'd like to join it with std C-x 4 command, i.e to have a function which opens a file from a different project in another window, similar to C-c p 4 f. I couldn't find anything like this in the helm codebase and current implementation for projectile-find-file-other-window didn't shed the light how i can do this myself.

  • 1
    You don't need another command to open files in other window. Just use the usual command, move cursor to a file and press "C-c o" to open in other wimdow. – Tu Do Feb 16 '15 at 12:16
  • @TuDo Thanks a lot. I'm ready to mark it as an answer, though a quick question, is there any utility function like other-window which display any output in a different window, like (other-window (function-which-returns-something))? – 4lex1v Feb 16 '15 at 13:46
  • as far as I know, there's none. You don't store your returned output in a window, but a buffer. Then select a window and switch buffer to it. You can create other window and switch to your buffer like this: (with-selected-window (select-window (split-window-horizontally)) (switch-to-buffer your-buffer) (message "Hello or do something else")). – Tu Do Feb 16 '15 at 14:17
3

You don't need another command to open files in other window. Just use the usual command, move cursor to a file and press C-c o to open in other wimdow.

  • This is great! But, where is C-c o documented? How could I have found this in Emacs's docs (and where can I find other such keys)? – Glyph Oct 26 '17 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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