Hi, I've noticed that I often have one vifm instance where I house all of my relevant directories. However, upon rebooting / restarting my session I now manually start new tabs and go to my directories.
So my directory structure looks something like this:
Tab 1 (named local): dir/a (left), dir/b (right)
Tab 2 (named remote): dir/c (left), dir/d (right)
Tab 3 (named remote2): dir/e (left), dir/f (right)
Is there a way to set up vifm in such a way that it automatically starts with the tabs named accordingly and in those tabs the left and right panes opened in their specific directories?
you can add something like the following to your vifmrc to get the desired configuration:
cd /etc /var
cd /usr /proc
cd /home /dev
" start on the first tab
Next release (the one after 0.10.1) will have persistent tabs
(set vifminfo+=tabs), which might also be relevant in this case.
Is there a way to call those instructions using a command or something similar?
I would love to have something like :gotomydirs and have it run those commands.
You can do:
command! gotomydirs tabname local
\| cd /etc /var
\| " and so on...
However, in this case it might be simpler to save configuration in a file like
:e $VIFM/mydirs.vifm and define
command! gotomydirs source $VIFM/mydirs.vifm
Thanks, but that doesn't seem to be working for me.
I've put the following in $VIFM/mydirs_test.vifm:
cd /home/ /home/
And in $VIFM/vifmrc I put command! mytest source $VIFM/mydirs_test.vifm
command! mytest source $VIFM/mydirs_test.vifm
But when I start vifm and run :mytest it says:
/home/me/.config/vifm/mydirs_test.vifm: line 1: tabname: command not found
/home/me/.config/vifm/mydirs_test.vifm: line 2: cd: too many arguments
Press return ...
It's the same if I prepend both of the lines with :
My bad, sorry, I missed a colon, it should be:
command! mytest :source $VIFM/mydirs_test.vifm
Thanks, that did the trick.
And I'm looking forward to the persistent tabs feature :)