1

I am using vim for some time now and wanted to start using it for my latex files as well. Since the tutorials on the vim-latex homepage use the gui version of vim to include templates etc., I thought I might try that as well. Said and done, I installed GVim (tried vim-gnome as well as vim-gtk from the official repos), however the menubar is not working, thus defeating the whole purpose of using easy drop down menus instead of memorizing the additional vim-latex commands.

For example even something simple like File -> Exit (which corresponds to the CLI command :qa) does not work and nothing happens. My current vi version is 7.4.1689, the OS I am using is Ubuntu 16.04. As a side note I noticed the following errors when starting GVim from a terminal:

(gvim:5929): Gdk-WARNING **: locale not supported by C library

as well as the following message upon closing it:

(gvim:5929): GLib-GObject-WARNING **: cannot retrieve class for invalid (unclassed) type '<invalid>'

I hope that I stated my problem in an understandable manner, if some additional information is needed to analyze the problem I am happy to provide it. If this is an already known bug/issue (although my online search didn't imply so), I would be glad to be directed to the discussions regarding this issue.

6
  • If you run LC_ALL=C gvim -Nu NONE, does this still happen?
    – muru
    Feb 23, 2017 at 1:58
  • Thanks for the reply muru, I still get the second error message upon exiting gvim ' (gvim:5887): GLib-GObject-WARNING **: cannot retrieve class for invalid (unclassed) type '<invalid>' ' however File->Exit worked now I then went on and just tried to start gvim with the -u option and it worked too, so apparently I have some bad setting in my .vimrc. I am using a .vimrc that I found on the web since I liked the option that were presented in it and it was clearly structured and had some neat features built in it, I will try to identify the line that is responsible for this odd behaviour.
    – bluesheep
    Feb 23, 2017 at 11:52
  • That sort of error is common in GUI programs. Is the menu still not working, though?
    – muru
    Feb 23, 2017 at 11:54
  • Sorry I hit the enter button accidentally too soon there, I updated my previous comment. If you have any suspicion on what the faulty line in the .vimrc might be I would be very thankful. took it from here: github.com/amix/vimrc/blob/master/vimrcs/basic.vim
    – bluesheep
    Feb 23, 2017 at 12:00
  • Ok so apparently this issue was connected to the following line in my .vimrc au FocusGained,WinEnter,BufEnter,BufWinEnter * :silent! ! the option is connected to set autoread, I haven't unterstood the implications yet, however I am glad I got this sorted out, so thanks again for your reply, help and pointing me in the right direction!
    – bluesheep
    Feb 23, 2017 at 12:35

1 Answer 1

0

Ok, so after I was guided in the right direction by the user muru (thanks again!) I managed to identify the culprit:

My .vimrc file used the following setting

au FocusGained *: silent! !

which is commonly used for rereading/redrawing the file when an external change has been made and vim regains focus. I don't yet understand why this line caused the issue, all I know is that excluding it from my .vimrc solves my issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .