Events for autohiding #221

c0ffeeartc opened this Issue Apr 21, 2015 · 2 comments


None yet
2 participants

I use vimperator with set gui=none and hidden vimperator bar.
There is current solution #26 to autohide vimperator bar by rebinding hotkeys to show bar on keystroke and to hide on <esc>, <cr>.
Here is my hotkey setup

no <silent> ,h :js toggle_bottombar()<CR>
no <silent> <c-h> :js toggle_bottombar()<CR>
""noremap <silent> <F8> :js toggle_bottombar()<CR>
noremap : :js toggle_bottombar('on')<CR>:
noremap ; :js toggle_bottombar('on')<CR>;
noremap o :js toggle_bottombar('on')<CR>o
noremap O :js toggle_bottombar('on')<CR>O
noremap <c-t> :js toggle_bottombar('on')<CR>:tabopen 
noremap t :js toggle_bottombar('on')<CR>t
noremap T :js toggle_bottombar('on')<CR>t
noremap / :js toggle_bottombar('on')<CR>/
noremap v :js toggle_bottombar('on')<CR>v
noremap V :js toggle_bottombar('on')<CR>V
noremap c :js toggle_bottombar('on')<CR>c
noremap C :js toggle_bottombar('on')<CR>C
vnoremap <c-CR> <CR>
cnoremap <c-CR> <CR>
vnoremap <c-Esc> <Esc>
cnoremap <c-Esc> <Esc>
vnoremap <CR> <CR>:js toggle_bottombar('off')<CR>
cnoremap <CR> <CR>:js toggle_bottombar('off')<CR>
vnoremap <Esc> <Esc>:js toggle_bottombar('off')<CR>
cnoremap <Esc> <Esc>:js toggle_bottombar('off')<CR>

There are inconviniences in this method:

  • Maintaining each hotkey for hiding
  • remembering when to use non-hiding confirmation hotkey(:bmarks <c-CR> instead of :bmarks<cr>)
  • no mode indication in unexpected situtation (some sites start in Insert mode and don't leave it on <esc>)

While the current setup is ok, would you consider adding VimperatorOutputBegins and VimperatorOutputEnded events that fire whenever meaningful info is being written, and once it gets finished, and something like VimperatorModeChanged to allow easier way to react:

au VimperatorOutputBegins .* js show_bottombar()
au VimperatorOutputEnded  .* js hide_bottombar()
au VimperatorModeChanged .* js if(mode==Normal) hide_bottombar(); else show_bottombar();

gkatsev commented Jan 27, 2016

This has been fixed.

@gkatsev gkatsev closed this Jan 27, 2016

Thank you. Here is News section

* Autohide statusbar: When entering fullscreen mode, the statusbar is
  hidden and temporarily showed up with command inputs. Also, Users can
  manually hide and unhide the statusbar with a command:
  :js statusline.setVisibility(statusline.setVisibility.TOGGLE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment