You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1 year ago | |
---|---|---|
LICENSE | 1 year ago | |
README.md | 1 year ago | |
e | 1 year ago |
README.md
e
use vifm to open neovim via tmux as easy as the likes of NERDTree.
Setup
- put a symlink to
e
in yourbin/
folder (~/.local/bin
,~/bin
or whatever) - edit vifm config, add the following lines somewhere
"save current tmux pane if $TMUX let $VIFM_TMUX_SESSION_NAME = system("tmux lsw -F '#{session_name}' -f '#{window_active}'") let $VIFM_TMUX_WINDOW_INDEX = system("tmux lsw -F '#{window_index}' -f '#{window_active}'") endif " Open file in existing instance of neovim (tmux-aware) nnoremap o :execute "!e @".$VIFM_TMUX_SESSION_NAME.":".$VIFM_TMUX_WINDOW_INDEX." %f &"<cr>
How to use
From vifm
press o
on a file. It'll open in a pane to the right of vifm (maybe you should also do a :split
instead of a :vsplit
).
Select another file and press o
again. It'll open in the same instance of neovim. Magic!
From elsewhere
e @<session-name>:<window-number> <file>
: will open a <file>
in the specified session of tmux inside a specified window.