Make Goyo enable/disable Limelight
This commit is contained in:
parent
ecac85ad09
commit
ac3709eb2a
1 changed files with 12 additions and 1 deletions
13
vimrc
13
vimrc
|
@ -35,7 +35,7 @@ inoremap <left> <nop>
|
||||||
inoremap <right> <nop>
|
inoremap <right> <nop>
|
||||||
inoremap <up> <nop>
|
inoremap <up> <nop>
|
||||||
|
|
||||||
nnoremap <F11> :Goyo<bar>:Limelight!!<CR>
|
nnoremap <F11> :Goyo<CR>
|
||||||
nnoremap <F12> :w<CR>
|
nnoremap <F12> :w<CR>
|
||||||
nnoremap <F7> :setlocal spell! spelllang=en_gb<CR>
|
nnoremap <F7> :setlocal spell! spelllang=en_gb<CR>
|
||||||
nnoremap <down> <nop>
|
nnoremap <down> <nop>
|
||||||
|
@ -143,6 +143,9 @@ if has('autocmd')
|
||||||
autocmd BufRead,BufNewFile *.xml set et sw=2
|
autocmd BufRead,BufNewFile *.xml set et sw=2
|
||||||
autocmd BufRead,BufNewFile *.yaml set et sw=2
|
autocmd BufRead,BufNewFile *.yaml set et sw=2
|
||||||
autocmd BufRead,BufNewFile *.yml set et sw=2
|
autocmd BufRead,BufNewFile *.yml set et sw=2
|
||||||
|
|
||||||
|
autocmd User GoyoEnter nested call <SID>goyo_enter()
|
||||||
|
autocmd User GoyoLeave nested call <SID>goyo_leave()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if has('folding')
|
if has('folding')
|
||||||
|
@ -207,6 +210,14 @@ if has('wildmenu')
|
||||||
set wildmenu
|
set wildmenu
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
function! s:goyo_enter()
|
||||||
|
Limelight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:goyo_leave()
|
||||||
|
Limelight!
|
||||||
|
endfunction
|
||||||
|
|
||||||
" Customise colour schemes. Keep this near the end.
|
" Customise colour schemes. Keep this near the end.
|
||||||
if &background ==# 'light'
|
if &background ==# 'light'
|
||||||
highlight SpecialKey ctermfg=lightgray ctermbg=NONE
|
highlight SpecialKey ctermfg=lightgray ctermbg=NONE
|
||||||
|
|
Loading…
Reference in a new issue