vhakulinen / gnvim

GUI for neovim, without any web bloat
MIT License
1.85k stars 69 forks source link

Setting GnvimCursorEnableAnimations in vimrc doesn't work #162

Closed dead10ck closed 1 year ago

dead10ck commented 3 years ago

I'd like to permanently disable the cursor animations, but it looks like when I put the GnvimCursorEnableAnimations 0 in my vimrc, it fails with an error that says Not an editor command: GnvimCursorEnableAnimations 0

mulianov commented 3 years ago

Could you please add command line option for this?

wezm commented 2 years ago

This worked for me:

  call rpcnotify(g:gnvim_channel_id, 'Gnvim', 'EnableCursorAnimations', 0)
MeanEYE commented 2 years ago

Another issue I have with this approach is that there's no way to detect if GUI is running and just blindly calling rpcnotify it not working for CLI version.

vhakulinen commented 2 years ago

You can check if gnvim is running with exists("g:gnvim")

MeanEYE commented 2 years ago

You can check if gnvim is running with exists("g:gnvim")

Thanks. I managed in different way. I'll change this code. Is there a reason why ginit.vim and gvimrc are not executed? Until now that's where people kept their GUI configs.

vhakulinen commented 2 years ago

No other reason than just to not have it. You can source it manually if you so desire (see :h source).

MeanEYE commented 2 years ago

I know I can source it, but whole point of it existing was that we didn't have to do GUI detection on our own, just put GUI specific stuff there. Pretty much every iteration of Vim does it. I don't have many commands explicitly for GUI so it's not an issue for me, but might be for others.

vhakulinen commented 2 years ago

The GUI specific stuff you might want to do likely depends on the GUI you're using, so you'd need to do that detection within ginit.vim either way.

MeanEYE commented 2 years ago

Hm, yeah, that's an NeoVim specific issue which I didn't consider since I just moved from Vim. Either way my problem is solved.

vhakulinen commented 1 year ago

Gnvim was rewritten from ground up for gtk4. If the problem persists, feel free to reopen this issue.