When I highlight multiple files in ranger from the same dir, I can open them all in vim with r and than 0 or @ and than add vim. But if I highlight files from different dirs, than this doesn't work. Any ideas why and how to get it working?

Bonus question: I would like to open all files with vims -o flag (to split vertical), but that doesn't work either, not even on files in the same dir.

  • It works for me in Linux with vim version 7.4. It opens the files in the same directory in split mode
    – SibiCoder
    Apr 25, 2016 at 6:53

2 Answers 2


To copy/move multiple files, just mark them with Space then use "dd/yy". If you want to operate on multiple files stored in different directories, you may use "ya/da" to add them to the list of files to be copied/moved before pasting them.

(Note that the copy/cut buffers can be used for other operations as well, by using the "%c" macro in your commands. For example, adding files to the cut/copy buffer using "ya"/"da" then using the :shell -w printf %c | xargs rm command allows you to delete multiple files in multiple directories. Remember to clear the buffer once you're done using "ud"/"uy".)

So add the files with ya and then use a mapping like xv:

map xv shell vim %c

A quick solution without having to use mappings: Having highlighted the files (with space or V), just hit @ and type vim -o. This should take you into the ranger shell looking as below:

:shell vim -o %s

Pressing enter will open vim in split pane mode.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .