Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.

Get out of tree mode

0 votes
asked Feb 15, 2018 in vifm by Desperados

Sorry for probably dumb question
I just can't fine the way out of tree mode
I got there using the :tree command
and it is not a toggle
Searching by 'tree' keyword in both q2a and document resulted in no outcome

1 Answer

+1 vote
answered Feb 15, 2018 by xaizek

You just need to go up root of the tree either by hitting h at the top level or gh at any level. :cd .. also works.

I'll add this to documentation of :tree and gh, you're not the first one to ask the question. It's really isn't that obvious, I guess people figure it out mostly experimentally, thanks.

commented Feb 15, 2018 by tagwint

Ok, it's me who was desperados, not remembering my pwd )

Your advise is good for ones who just gets into tree mode,
my issue was different,
it was something different, like an info panel, but in tree form
and gh did not work for that case

I digged into vifminfo, saved problematic #State section ,then removed it completely
Afterwards, It apparently reset the mode back to 2 normal panes
then i compared the 'normal' GOOD #State against the BAD 'tree no way out' one
Here they are:

1164 BAD           GOOD                                                                                                        
1165 # State:      # State:                                                                                                    
1166 f             f                                                                                                           
1167 i1            i1                                                                                                          
1168 [.0           [.1                                                                                                         
1169 [F            [F                                                                                                          
1170 F             F                                                                                                           
1171 I1            I1                                                                                                          
1172 ].0           ].1                                                                                                         
1173 ]F            ]F                                                                                                          
1174 s0            s0       

You can try them to compare to figure out what exactly mode it was
then suggest the usual way out w/o hacking vifminfo
Obviously the reason is in lines
1168 and 1172
either, or both
I'd appreciate if you explain their meaning to me

Thank you for your support!

commented Feb 15, 2018 by xaizek

[.0 is just a dot filter (hidden files). Maybe you're talking about view mode and saw tree preview? Try pressing e on a directory.

commented Feb 15, 2018 by tagwint

unfortunately (or fortunataly?), I cannot restore the problematic state anymore
after cleaning up vifminfo
will try pressing e if i happen to get there again
thanks anyway

commented Feb 15, 2018 by xaizek

Screenshots contain two examples of trees (on the right):
Which one did you see? I think you're talking about the first one, which is just a preview and is controlled with :view (e enters view mode which should display the same; you can leave it with q).

commented Feb 16, 2018 by tagwint

Yes, I believe it was the first of your screenshots,
the one you get with :view command
it displays tree when the cursor is at dir, and file content when at file.
the view panel can be scrolled but not really entered with cursor
unlike when in tree mode (the 2nd screenshot)

there is a difference between entering view mode with
A. :view commad
B. pressing e

A displays view on the other pane and allows to continue navigating on current pane
the other pane will reflect the content/tree of the current item if it changes

B displays view on the same pane which stays the same even after you Tab to the other pane
and change the current item by navigating away from the one you pressed e at

A can be left :view again i.e. works as toggle

B can be left with q

So i think my original case was A
which I counfused with tree mode and neither of advised :cd h gh could help
neither can q which seem only work with B
:view is the right way out there

I am happy I seem to have identified the reason with your help

Many thanks
Many thanks

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.