mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 10:30:05 +08:00
Fix goyo support
This commit is contained in:
parent
737858bde3
commit
b9105b575d
@ -25,10 +25,10 @@
|
||||
- [Awesome ui](#awesome-ui)
|
||||
- [Language specific mode](#language-specific-mode)
|
||||
- [c/c++ support](#cc-support)
|
||||
- python support
|
||||
- [go support](#go-support)
|
||||
- rust support
|
||||
- php support
|
||||
- python support
|
||||
- perl support
|
||||
- lua support
|
||||
- [Unite centric work-flow](#unite-centric-work-flow)
|
||||
|
@ -27,6 +27,9 @@ function! SpaceVim#default#SetOptions() abort
|
||||
set relativenumber
|
||||
set number
|
||||
|
||||
" hide cmd
|
||||
set noshowcmd
|
||||
|
||||
" indent
|
||||
set autoindent
|
||||
set smartindent
|
||||
@ -78,7 +81,6 @@ function! SpaceVim#default#SetOptions() abort
|
||||
set nowritebackup
|
||||
set matchtime=0
|
||||
set ruler
|
||||
set showcmd
|
||||
set showmatch
|
||||
set showmode
|
||||
"menuone: show the pupmenu when only one match
|
||||
|
@ -4,6 +4,7 @@ function! SpaceVim#layers#tools#plugins() abort
|
||||
\ ['wsdjeg/vim-cheat', { 'on_cmd' : 'Cheat'}],
|
||||
\ ['wsdjeg/SourceCounter.vim', { 'on_cmd' : 'SourceCounter'}],
|
||||
\ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}],
|
||||
\ ['junegunn/limelight.vim', { 'on_cmd' : 'Limelight'}],
|
||||
\ ['Yggdroot/LeaderF', {'merged' : 0}],
|
||||
\ ['google/vim-searchindex'],
|
||||
\ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}],
|
||||
|
@ -1,18 +1,26 @@
|
||||
let s:save_option = {}
|
||||
function! s:goyo_enter()
|
||||
silent !tmux set status off
|
||||
let s:save_option['showmode'] = &showmode
|
||||
let s:save_option['showcmd'] = &showcmd
|
||||
let s:save_option['scrolloff'] = &scrolloff
|
||||
set noshowmode
|
||||
set noshowcmd
|
||||
set scrolloff=999
|
||||
Limelight
|
||||
if exists(':Limelight') == 2
|
||||
Limelight
|
||||
let s:save_option['limelight'] = 1
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:goyo_leave()
|
||||
silent !tmux set status on
|
||||
set showmode
|
||||
set showcmd
|
||||
set scrolloff=5
|
||||
let &showmode = s:save_option['showmode']
|
||||
let &showcmd = s:save_option['showcmd']
|
||||
let &scrolloff = s:save_option['scrolloff']
|
||||
if get(s:save_option,'limelight', 0)
|
||||
execute 'Limelight!'
|
||||
endif
|
||||
endfunction
|
||||
augroup goyo_map
|
||||
autocmd! User GoyoEnter nested call <SID>goyo_enter()
|
||||
autocmd! User GoyoLeave nested call <SID>goyo_leave()
|
||||
autocmd! User GoyoEnter nested call <SID>goyo_enter()
|
||||
autocmd! User GoyoLeave nested call <SID>goyo_leave()
|
||||
augroup END
|
||||
|
Loading…
Reference in New Issue
Block a user