1
0
mirror of https://github.com/amix/vimrc synced 2025-07-12 14:15:00 +08:00

updated plugins and added eslint goodies

This commit is contained in:
Max Alcala
2016-02-19 10:35:36 -06:00
parent a1deb28314
commit f3143286d3
402 changed files with 14389 additions and 4024 deletions

View File

@ -33,7 +33,7 @@ function! s:get_color(group, attr)
endfunction
function! s:set_color(group, attr, color)
let gui = has('gui_running')
let gui = a:color =~ '^#'
execute printf("hi %s %s%s=%s", a:group, gui ? 'gui' : 'cterm', a:attr, a:color)
endfunction
@ -106,7 +106,7 @@ function! s:resize_pads()
endfunction
function! s:tranquilize()
let bg = s:get_color('Normal', 'bg')
let bg = s:get_color('Normal', 'bg#')
for grp in ['NonText', 'FoldColumn', 'ColorColumn', 'VertSplit',
\ 'StatusLine', 'StatusLineNC', 'SignColumn']
" -1 on Vim / '' on GVim
@ -269,7 +269,9 @@ function! s:goyo_on(dim)
if exists('g:goyo_callbacks[0]')
call g:goyo_callbacks[0]()
endif
silent! doautocmd User GoyoEnter
if exists('#User#GoyoEnter')
doautocmd User GoyoEnter
endif
endfunction
function! s:goyo_off()
@ -344,6 +346,9 @@ function! s:goyo_off()
if goyo_disabled_airline && !exists("#airline")
AirlineToggle
" For some reason, Airline requires two refreshes to avoid display
" artifacts
silent! AirlineRefresh
silent! AirlineRefresh
endif
@ -363,7 +368,9 @@ function! s:goyo_off()
if exists('g:goyo_callbacks[1]')
call g:goyo_callbacks[1]()
endif
silent! doautocmd User GoyoLeave
if exists('#User#GoyoLeave')
doautocmd User GoyoLeave
endif
endfunction
function! s:relsz(expr, limit)
@ -414,6 +421,10 @@ function! goyo#execute(bang, dim)
if exists('#goyo') == 0
call s:goyo_on(a:dim)
elseif !empty(a:dim)
if winnr('$') < 5
call s:goyo_off()
return goyo#execute(a:bang, a:dim)
endif
let dim = s:parse_arg(a:dim)
if !empty(dim)
let t:goyo_dim = dim