mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-16 23:33:42 -05:00
setlocal -> set
This commit is contained in:
@@ -105,15 +105,18 @@ function! s:goyo_on(width)
|
|||||||
|
|
||||||
let t:goyo_master = winbufnr(0)
|
let t:goyo_master = winbufnr(0)
|
||||||
let t:goyo_width = a:width
|
let t:goyo_width = a:width
|
||||||
setlocal nonu nornu
|
|
||||||
|
|
||||||
let t:goyo_pads = {}
|
let t:goyo_pads = {}
|
||||||
let t:goyo_revert =
|
let t:goyo_revert =
|
||||||
\ { 'laststatus': &laststatus,
|
\ { 'laststatus': &laststatus,
|
||||||
\ 'showtabline': &showtabline,
|
\ 'showtabline': &showtabline,
|
||||||
\ 'fillchars': &fillchars,
|
\ 'fillchars': &fillchars,
|
||||||
\ 'winwidth': &winwidth,
|
\ 'winwidth': &winwidth,
|
||||||
\ 'winheight': &winheight }
|
\ 'winheight': &winheight,
|
||||||
|
\ 'number': &number,
|
||||||
|
\ 'relativenumber': &relativenumber,
|
||||||
|
\ 'colorcolumn': &colorcolumn,
|
||||||
|
\ 'statusline': &statusline
|
||||||
|
\ }
|
||||||
|
|
||||||
" gitgutter
|
" gitgutter
|
||||||
let t:goyo_disabled_gitgutter = get(g:, 'gitgutter_enabled', 0)
|
let t:goyo_disabled_gitgutter = get(g:, 'gitgutter_enabled', 0)
|
||||||
@@ -121,9 +124,9 @@ function! s:goyo_on(width)
|
|||||||
GitGutterDisable
|
GitGutterDisable
|
||||||
endif
|
endif
|
||||||
|
|
||||||
setlocal colorcolumn=
|
set nonu nornu
|
||||||
setlocal statusline=\
|
set colorcolumn=
|
||||||
|
set statusline=\
|
||||||
set winwidth=1
|
set winwidth=1
|
||||||
set winheight=1
|
set winheight=1
|
||||||
set laststatus=0
|
set laststatus=0
|
||||||
@@ -142,9 +145,10 @@ function! s:goyo_on(width)
|
|||||||
|
|
||||||
augroup goyo
|
augroup goyo
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd TabLeave,BufWinLeave <buffer> call s:goyo_off()
|
autocmd BufWinLeave <buffer> call s:goyo_off()
|
||||||
autocmd VimResized * call s:resize_pads()
|
autocmd TabLeave * call s:goyo_off()
|
||||||
autocmd ColorScheme * call s:tranquilize()
|
autocmd VimResized * call s:resize_pads()
|
||||||
|
autocmd ColorScheme * call s:tranquilize()
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
let t:goyohan = 1
|
let t:goyohan = 1
|
||||||
@@ -160,7 +164,7 @@ function! s:goyo_off()
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
for [k, v] in items(t:goyo_revert)
|
for [k, v] in items(t:goyo_revert)
|
||||||
execute printf("setlocal %s=%s", k, escape(v, ' |'))
|
execute printf("let &%s = %s", k, string(v))
|
||||||
endfor
|
endfor
|
||||||
execute 'colo '. g:colors_name
|
execute 'colo '. g:colors_name
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user