Chakradar Raju
Chakradar Raju

Reputation: 2811

How to invoke a plugin in vim when no file is opened from commandline?

I tried suggestions in this question: Vim - how to run a command immediately when starting vim?

command gets executed everytime vim is invoked,

I want MRU plugin to be opened only when I'm invoking vim without any files to open

Upvotes: 2

Views: 91

Answers (1)

Christian Brabandt
Christian Brabandt

Reputation: 8248

I think, you can do something like this:

if argc() == 0
    augroup MyVimEnter
     au!
     au VimEnter * ... " put the plugin command here
    augroup END
endif

Upvotes: 3

Related Questions