new option: g:startify_skiplist_server

Before this we ignored all Vim server instances. That was a bad
decision. Apart from some weird cases, where servernames were set, it
totally slipped my attention, that gvim would always set a servername.

Sorry, for breaking this plugin for all gvim users!

I removed the check and added a configurable list of servernames to
be ignored.
This commit is contained in:
Marco Hinz 2013-04-26 10:18:31 +02:00
parent c91cfb29ae
commit 267c7abe72
2 changed files with 18 additions and 5 deletions

View file

@ -118,6 +118,16 @@ Example: let g:startify_skiplist = [
\ ]
============-
let g:startify_skiplist_server = []
Do not create the startify buffer, if this is a Vim server instance with a
name contained in this list.
Example: let g:startify_skiplist_server = [ 'GVIM' ]
============-
let g:startify_unlisted_buffer = 1

View file

@ -23,7 +23,13 @@ command! -nargs=0 -bar Startify enew | call s:insane_in_the_membrane()
" Function: s:insane_in_the_membrane {{{1
function! s:insane_in_the_membrane() abort
setfiletype startify
if !empty(v:servername) && exists('g:startify_skiplist_server')
for servname in g:startify_skiplist_server
if servname == v:servername
return
endif
endfor
endif
setlocal nonumber buftype=nofile
if v:version >= 703
setlocal norelativenumber
@ -31,11 +37,8 @@ function! s:insane_in_the_membrane() abort
if get(g:, 'startify_unlisted_buffer', 1)
setlocal nobuflisted
endif
call s:genesis()
endfunction
setfiletype startify
" Function: s:genesis {{{1
function! s:genesis() abort
call append('$', [' startify>', '', ' [e] <empty buffer>'])
let cnt = 0
let sep = startify#get_sep()