ranger.vim icon indicating copy to clipboard operation
ranger.vim copied to clipboard

Can we use ranger for changing working directory?

Open ywpkwon opened this issue 5 years ago • 4 comments
trafficstars

Hi. I'm a big fan of ranger and vim, and it's so happy to see this plugin.

I have one question. In addition to finding/opening a file, can we use this for changing the working directory? (e.g, open ranger, navigate folders, and select a directory to set the directory as the working directory,)

ywpkwon avatar Apr 13 '20 02:04 ywpkwon

pair it it with vim-rooter maybe?

ChristianChiarulli avatar May 02 '20 20:05 ChristianChiarulli

You might want to enable fuzzysearch in ranger. Or markers.

Zeioth avatar Jul 28 '20 22:07 Zeioth

pair it it with vim-rooter maybe?

That was a suggestion to the developer or to the op? In case you meant the 2nd, I would appreciate some pointers in order to to that ;-)

lifeBalance avatar Apr 19 '21 12:04 lifeBalance

I patched it to change working directory when you quit ranger. I imagined people might want a variable or some way to control this behavior but for me i just always want it update the cwd. Just in case anyone wants to submit a proper PR ;)

    Add support for choosing directory when calling out to ranger
    when ranger exits, change the current working directory of vim to the
    last selected directory in ranger

https://github.com/doctorguile/ranger.vim/commit/149ab7ff671a8e53d32f18ec6324b82350b2ab71

doctorguile avatar Sep 17 '23 05:09 doctorguile