Skip to content

Toggle-able pane ratios #1938

Answered by joelim-work
avidseeker asked this question in Q&A
Discussion options

You must be logged in to vote

This kind of use case is already mentioned in the wiki: https://github.com/gokcehan/lf/wiki/Tips#toggling-the-preview-column

Something like below should work:

map <a-p> &{{
    if [ "$lf_preview" = true ]; then
        lf -remote "send $id :set preview false; set ratios 1:5"
    else
        lf -remote "send $id :set preview true; set ratios 1:2:3"
    fi
}}

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by avidseeker
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants