If I highlighted a filename in the copy mode, how could I open that file with vim by a hotkey?
I'm imagining something like:
bind-key -T copy-mode-vi 'C-o' send-keys -X copy-pipe-and-cancel "vim $(tmux paste-buffer)"
but that doesn't work, plus piping is redundant in this case.
I know there is tmux-open which should do similar thing, but it doesn't work for me somehow.
Environment: OSX 10.13.5, iTerm2 3.1.7, Tmux stable 2.7 built by homebrew
I normally have these settings in my vimrc
set hidden
set path+=**
Then you can just press gf when you cursor is over a word. If you want to open it on a new window, press Ctrl-w gf. If you just use gf you can go back by pressing Ctrl-6.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With