-
-
Notifications
You must be signed in to change notification settings - Fork 106
/
module-goyo.vim
52 lines (46 loc) · 1003 Bytes
/
module-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
49
50
51
52
" 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
let g:loaded_spaceline=0
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
let g:loaded_spaceline =1
Limelight!
endfunction
" }}}
" Goyo Commands {{{
augroup user_plugin_goyo
autocmd!
autocmd! User GoyoEnter
autocmd! User GoyoLeave
autocmd User GoyoEnter nested call <SID>goyo_enter()
autocmd User GoyoLeave nested call <SID>goyo_leave()
augroup END
" }}}
" vim: set foldmethod=marker ts=2 sw=2 tw=80 noet :