我想要做的是这个,但是如果我正在执行一些命令,并且该命令有一个输出,我也希望能够看到命令的输出,所以,这就是我所做的:
"javascript to hide statusbar
noremap <silent> <F8> :js toggle_bottombar()<CR>
noremap : :js toggle_bottombar('on', true)<CR>:
noremap b :js toggle_bottombar('on')<CR>b
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
var executing_command = false;
function toggle_bottombar(p, command) {
var bb = document.getElementById('liberator-bottombar');
if (!bb)
return;
if (p == 'on'){
executing_command = (command === true) ? true : false;
bb.style.height = '';
bb.style.overflow = '';
return;
}
if (p == 'off'){
if (!executing_command){
bb.style.height = '0px';
bb.style.overflow = 'hidden';
} else {
toggle_bottombar('on');
}
return;
}
bb.style.height = (bb.style.height == '') ? '0px' : '';
bb.style.overflow = (bb.style.height == '') ? '' : 'hidden';
}
toggle_bottombar();
EOF
这一半有效,因为当我输入命令时,它会在我按下回车后一直显示状态栏但输出丢失,你有什么想法来实现这个吗?
我试过了,:help style
但这并没有太大帮助……那里没有足够的文档。