Skip to content

Commit 2a9908e

Browse files
author
amix
committed
Updated plugins
1 parent b92f0f2 commit 2a9908e

File tree

88 files changed

+2827
-2002
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2827
-2002
lines changed

sources_non_forked/goyo.vim/plugin/goyo.vim

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function! s:setup_pad(bufnr, vert, size)
6464
execute win . 'wincmd w'
6565
execute (a:vert ? 'vertical ' : '') . 'resize ' . max([0, a:size])
6666
augroup goyop
67-
autocmd WinEnter <buffer> call s:blank()
67+
autocmd WinEnter,CursorMoved <buffer> call s:blank()
6868
augroup END
6969

7070
" To hide scrollbars of pad windows in GVim
@@ -127,6 +127,7 @@ function! s:goyo_on(width)
127127
\ { 'laststatus': &laststatus,
128128
\ 'showtabline': &showtabline,
129129
\ 'fillchars': &fillchars,
130+
\ 'winminwidth': &winminwidth,
130131
\ 'winwidth': &winwidth,
131132
\ 'winminheight': &winminheight,
132133
\ 'winheight': &winheight,
@@ -145,6 +146,12 @@ function! s:goyo_on(width)
145146
silent! GitGutterDisable
146147
endif
147148

149+
" vim-signify
150+
let t:goyo_disabled_signify = exists('b:sy') && b:sy.active
151+
if t:goyo_disabled_signify
152+
SignifyToggle
153+
endif
154+
148155
" vim-airline
149156
let t:goyo_disabled_airline = exists("#airline")
150157
if t:goyo_disabled_airline
@@ -177,10 +184,10 @@ function! s:goyo_on(width)
177184
endif
178185

179186
" Global options
180-
set winwidth=1
181187
let &winheight = max([&winminheight, 1])
182188
set winminheight=1
183189
set winheight=1
190+
set winminwidth=1 winwidth=1
184191
set laststatus=0
185192
set showtabline=0
186193
set noruler
@@ -241,6 +248,7 @@ function! s:goyo_off()
241248

242249
let goyo_revert = t:goyo_revert
243250
let goyo_disabled_gitgutter = t:goyo_disabled_gitgutter
251+
let goyo_disabled_signify = t:goyo_disabled_signify
244252
let goyo_disabled_airline = t:goyo_disabled_airline
245253
let goyo_disabled_powerline = t:goyo_disabled_powerline
246254
let goyo_disabled_lightline = t:goyo_disabled_lightline
@@ -258,6 +266,10 @@ function! s:goyo_off()
258266
execute printf('normal! %dG%d|', line, col)
259267
endif
260268

269+
let wmw = remove(goyo_revert, 'winminwidth')
270+
let ww = remove(goyo_revert, 'winwidth')
271+
let &winwidth = ww
272+
let &winminwidth = wmw
261273
let wmh = remove(goyo_revert, 'winminheight')
262274
let wh = remove(goyo_revert, 'winheight')
263275
let &winheight = max([wmh, 1])
@@ -273,6 +285,12 @@ function! s:goyo_off()
273285
silent! GitGutterEnable
274286
endif
275287

288+
if goyo_disabled_signify
289+
silent! if !b:sy.active
290+
SignifyToggle
291+
endif
292+
endif
293+
276294
if goyo_disabled_airline && !exists("#airline")
277295
AirlineToggle
278296
silent! AirlineRefresh
@@ -296,20 +314,26 @@ function! s:goyo_off()
296314
endif
297315
endfunction
298316

299-
function! s:goyo(...)
317+
function! s:goyo(bang, ...)
300318
let width = a:0 > 0 ? a:1 : get(g:, 'goyo_width', 80)
301319

302-
if exists('#goyo') == 0
303-
call s:goyo_on(width)
304-
elseif a:0 > 0
305-
let t:goyo_width = width
306-
call s:resize_pads()
320+
if a:bang
321+
if exists('#goyo')
322+
call s:goyo_off()
323+
endif
307324
else
308-
call s:goyo_off()
325+
if exists('#goyo') == 0
326+
call s:goyo_on(width)
327+
elseif a:0 > 0
328+
let t:goyo_width = width
329+
call s:resize_pads()
330+
else
331+
call s:goyo_off()
332+
end
309333
end
310334
endfunction
311335

312-
command! -nargs=? Goyo call s:goyo(<args>)
336+
command! -nargs=? -bar -bang Goyo call s:goyo('<bang>' == '!', <args>)
313337

314338
let &cpo = s:cpo_save
315339
unlet s:cpo_save

sources_non_forked/nerdtree/README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ __Q. How can I open a NERDTree automatically when vim starts up if no files were
8383
A. Stick this in your vimrc
8484

8585
autocmd StdinReadPre * let s:std_in=1
86-
autocmd VimEnter * if !argc() == 0 && !exists("s:std_in") | NERDTree | endif
86+
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
8787

8888
__Q. How can I map a specific key or shortcut to open NERDTree?__
8989

0 commit comments

Comments
 (0)