forked from rafi/vim-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
goyo.vim
48 lines (41 loc) · 900 Bytes
/
goyo.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
" Goyo
" ----
" s:goyo_enter() "{{{
" Disable visual candy in Goyo mode
function! s:goyo_enter()
if has('gui_running')
" Gui fullscreen
set fullscreen
set background=light
set linespace=7
elseif exists('$TMUX')
" Hide tmux status
silent !tmux set status off
endif
" Activate Limelight
Limelight
endfunction
" }}}
" s:goyo_leave() "{{{
" Enable visuals when leaving Goyo mode
function! s:goyo_leave()
if has('gui_running')
" Gui exit fullscreen
set nofullscreen
set background=dark
set linespace=0
elseif exists('$TMUX')
" Show tmux status
silent !tmux set status on
endif
" De-activate Limelight
Limelight!
endfunction
" }}}
" Goyo Commands {{{
autocmd! User GoyoEnter
autocmd! User GoyoLeave
autocmd User GoyoEnter nested call <SID>goyo_enter()
autocmd User GoyoLeave nested call <SID>goyo_leave()
" }}}
" vim: set foldmethod=marker ts=2 sw=2 tw=80 noet :