vimperator autohide statusline
Asked Answered
B

1

5

Most of the time the Vimperator Statusline just sits there taking up space. Is there any way to autohide it so it only shows when I'm using it?

  • main_coon and _libjs don't work in recent firefox
Burkitt answered 10/1, 2014 at 19:53 Comment(1)
Similar or SU: superuser.com/questions/704015/…Besmear
H
8

Based on http://blog.yjl.im/2011/07/toggling-vimperator-statusline.html

"javascript to hide statusbar
noremap <silent> <F8> :js toggle_bottombar()<CR>
noremap : :js toggle_bottombar('on')<CR>:
noremap o :js toggle_bottombar('on')<CR>o
noremap O :js toggle_bottombar('on')<CR>O
noremap t :js toggle_bottombar('on')<CR>t
noremap T :js toggle_bottombar('on')<CR>t
noremap / :js toggle_bottombar('on')<CR>/
cnoremap <CR> <CR>:js toggle_bottombar('off')<CR>
cnoremap <Esc> <Esc>:js toggle_bottombar('off')<CR>

:js << EOF
function toggle_bottombar(p) {
    var bb = document.getElementById('liberator-bottombar');
    if (!bb)
        return;
    if (p == 'on'){
        bb.style.height = '';
        bb.style.overflow = '';
        return;
    }
    if (p == 'off'){
        bb.style.height = '0px';
        bb.style.overflow = 'hidden';
        return;
    }
    bb.style.height = (bb.style.height == '') ? '0px' : '';
    bb.style.overflow = (bb.style.height == '') ? '' : 'hidden';
}
toggle_bottombar();
EOF
Handspring answered 24/1, 2014 at 20:54 Comment(1)
That works, except the messages. E.g. if I make :hist status the bottom bar disappears and I can't see the history.Lindesnes

© 2022 - 2024 — McMap. All rights reserved.