Closed 097115 closed 6 years ago
Huh, it shouldn't appear when you read from stdin (e.g. echo foo | vim -
)
Can you give an example?
Yeah, vim -
doesn't launches Startify. That's my bad in formulating a question. However, there also other cases.
I actually had in mind something like passing some command line parameter that would tell Vim not no launch Startify. But solved it via something like -c "call feedkeys('e')"
, which simply bypasses Startify and opens an empty buffer.
Ah, okay. I thought there would be a bug. :)
Another way that keeps the plugin from even running would be:
$ vim -c 'let g:startify_disable_at_vimenter = 1'
More like "should be" :)
I mean, I tried that before opening the issue, but it didn't work for me. Probably because of this.
Maybe change it to this:
if has('nvim')
autocmd TabNewEntered * Startify
else
autocmd BufEnter *
\ if !exists('t:startify_new_tab') && empty(expand('%'))
\ && (get(g:, 'startify_disable_at_vimenter', 1) && bufnr('') != 1) |
\ let t:startify_new_tab = 1 |
\ Startify |
\ endif
endif
I'm not sure about the corner cases, because it's all just a big hack. (The Nvim version works as expected.)
Yeah, that seems working in Vim, too :) Thanks.
Is there any way to disable Startify from the command line? As much as I love it, sometimes (when reading from stdin, from example) I just don't need it :).