junegunn / limelight.vim

:flashlight: All the world's indeed a stage and we are merely players

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limelight enabled by default

vivien opened this issue · comments

Hi! How can I have Limelight on when starting Vim?

autocmd VimEnter * Limelight

in your .vimrc.

Works perfectly, thanks 👍

Just curious, when writing a plugin, what'd be the cons/pros to choose between letting the user do:

autocmd VimEnter * Limelight

or adding something like this in the plugin itself:

if g:plugin_enabled_on_startup
  if v:vim_did_enter
    Limelight
  else
    autocmd VimEnter * Limelight
  endif
endif

What's your approach?

Always strive to keep it simple. I don't care for plugins with a plethora of options.

The former: Using native construct that users already know and it's infinitely more flexible.
The latter: Doing the same thing with more code, users have to read and learn about the feature, typo in the variable name is not checked. What's the point?

I definitely agree. I had a good clue when writing down the question, but it's always interesting to get points of view from others.