本文介绍了vimperator自动隐藏状态行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大多数时候,Vimperator状态线只是坐在那里占用空间.有什么方法可以自动隐藏它,使其仅在我使用时显示?
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和_libjs在最新的Firefox中不起作用
推荐答案
基于 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
这篇关于vimperator自动隐藏状态行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!