diff options
| author | 2015-06-06 11:04:40 +0200 | |
|---|---|---|
| committer | 2015-06-06 11:04:40 +0200 | |
| commit | f00eb09823f1a4651404b7d020b03c044ee7ea8e (patch) | |
| tree | 223ea4b5ad7d9dc6815f5e19c8ea452b4de3a70a | |
| parent | d463da1b8ab6a0dadebb4644dea537a30216fbe2 (diff) | |
| download | dotfiles-f00eb09823f1a4651404b7d020b03c044ee7ea8e.tar.gz dotfiles-f00eb09823f1a4651404b7d020b03c044ee7ea8e.tar.bz2 dotfiles-f00eb09823f1a4651404b7d020b03c044ee7ea8e.zip | |
Added autohide to vimperator statusbar
| -rw-r--r-- | vimperator/.vimperatorrc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/vimperator/.vimperatorrc b/vimperator/.vimperatorrc index 984f4e0..872f044 100644 --- a/vimperator/.vimperatorrc +++ b/vimperator/.vimperatorrc | |||
| @@ -6,4 +6,43 @@ set hintchars=asdfjkluiowerqp | |||
| 6 | source! /home/tom/.vimperatorrc.local | 6 | source! /home/tom/.vimperatorrc.local |
| 7 | set gui=nonavigation | 7 | set gui=nonavigation |
| 8 | 8 | ||
| 9 | |||
| 10 | " Hide status bar when fullscreen mode is detected as found in: | ||
| 11 | " https://github.com/vimperator/vimperator-labs/issues/26#issuecomment-73982996 | ||
| 12 | |||
| 13 | autocmd Fullscreen .* js updateBottomBar() | ||
| 14 | |||
| 15 | " Re-enable bottom bar during certain commands. | ||
| 16 | noremap : :js updateBottomBar(false)<CR>: | ||
| 17 | noremap o :js updateBottomBar(false)<CR>o | ||
| 18 | noremap O :js updateBottomBar(false)<CR>O | ||
| 19 | noremap t :js updateBottomBar(false)<CR>t | ||
| 20 | noremap T :js updateBottomBar(false)<CR>t | ||
| 21 | noremap / :js updateBottomBar(false)<CR>/ | ||
| 22 | cnoremap <CR> <CR>:js updateBottomBar()<CR> | ||
| 23 | cnoremap <Esc> <Esc>:js updateBottomBar()<CR> | ||
| 24 | |||
| 25 | :js << EOF | ||
| 26 | |||
| 27 | let hlContentSepValue = highlight.get('ContentSeparator').value | ||
| 28 | |||
| 29 | function updateBottomBar(close = window.fullScreen) { | ||
| 30 | let bb = document.getElementById('liberator-bottombar') | ||
| 31 | if (! bb) return | ||
| 32 | |||
| 33 | if (close) { | ||
| 34 | bb.style.height = '0px' | ||
| 35 | bb.style.overflow = 'hidden' | ||
| 36 | liberator.execute('highlight ContentSeparator display: none;') | ||
| 37 | } | ||
| 38 | else { | ||
| 39 | bb.style.height = '' | ||
| 40 | bb.style.overflow = '' | ||
| 41 | liberator.execute('highlight ContentSeparator ' + hlContentSepValue) | ||
| 42 | } | ||
| 43 | } | ||
| 44 | updateBottomBar() | ||
| 45 | |||
| 46 | EOF | ||
| 47 | |||
| 9 | " vim: set ft=vimperator: | 48 | " vim: set ft=vimperator: |
