Here we have some amazing tools: tmux, ranger, vim... Would be amazing to configure ranger to open the files (when text editable) in a tmux newpane? Is that easy and how it is done?
migrated from serverfault.com Jul 11 '13 at 13:32
This question came from our site for system and network administrators.
I did some research and find it is not too hard.
To open the current selected file in ranger in a new pane (to the right) in an ad-hoc manner, you can first go to ranger's command line (by pressing :) and then type
To achieve this with some key binding, you can set it in a configuration file of ranger. For ranger 1.6, key bindings are specified in
While with ranger 1.4 you need a file
With the above setting when you press
The code is simply for demo, and it might need to involve with more safeguarding, such as checking for file type, etc.
Credit goes to ranger's help manual and