1

I recently compiled gVim 7.3.592 using gcc 4.7.1 from the MinGW distro available through nuwen.net. It was built with Python 2/3 and Ruby language interfaces (or more specifically, I had set the PYTHON, PYTHON3, and RUBY definitions in the makefile for MinGW).

Here's my gvimrc. I have a vimrc file that looks exactly similar.

For some reason, though, it looks like this:

enter image description here

How do I bring back the toolbar that was present in previous versions?

UPDATE: The issue occurs when I move the generated gvim.exe file out of the src directory into any other one. Bringing it back restores the toolbar icons and the menu.

0

5 Answers 5

3

If you type :e $MYVIMRC and then add the following and restart GVim, you should get things back to normal.

set guioptions+=m "adds menu bar

set guioptions+=T "adds toolbar

set guioptions+=r "always present scrollbar

You can also refer to the manual for a big list of options.


I decided I would try and go further and actually compile this myself. Downloaded the aforementioned Ming clone, and then cloned the vim repository. I compiled it with no plugins initially, and then compiled it with all combinations of plugins (Ruby, LUA, Python, and Perl thrown in for good measure).

I haven't gotten the glitch you've gotten so far, and through the chat you've told me that your compilation on another machine works as well. From that, it's definitely something quirky in your build environment.

7
  • 1
    I tried this, but it did not work. According to the manual, these options are already enabled by default. I don't understand why this would not work "out of the box," so to speak - I've compiled gVim the same way before, and everything worked fine.
    – Isxek
    Jul 11, 2012 at 0:26
  • Can you provide a link to where you got your vim version from? I want to give a shot at compilation but I can't seem to find it via vim/devel
    – qweet
    Jul 11, 2012 at 0:46
  • Thanks for looking into this. I got the source from code.google.com/p/vim (just cloned the repo).
    – Isxek
    Jul 11, 2012 at 0:47
  • I just compiled 592 without perl, ruby, python (I'm going to recompile with each of these options in a sec). It displays the correct things for me. Did you try compiling multiple times, or was this the first runthrough?
    – qweet
    Jul 11, 2012 at 2:00
  • Trying it now...
    – Isxek
    Jul 11, 2012 at 2:15
1

I had the same issue on windows for gvim(8.0). In my case the problem was not that the guioptions were set incorrectly. It turned out that I managed to delete some of the needed files for menus/etc from the vim directory.

So, looking at your problem, it seems that the executable could not find the files needed to create the menus and buttons. My solution was to re-extract the vim runtime archive into the vim directory which replaced the missing files. In your case you could either extract the runtime files to whichever directory vim is running from or copy the files and subdirectories from the location where the menus are working.

ps. for gvim80 the runtime archive is vim80-069rt.zip.

3
  • This is really a comment and not an answer to the original question. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. Please read Why do I need 50 reputation to comment? What can I do instead?
    – DavidPostill
    Feb 24, 2017 at 11:10
  • 1
    Perhaps I could have worded my answer/comment differently but the underlying issue that I had and the original question had were the same. Namely, vim could not find the configuration files for rendering the menus and buttons. I added the extra info in hoping it might be more generally useful.
    – Ken Riley
    Feb 24, 2017 at 17:15
  • The empty icon bar in the pic that was posted as part of the question proves that this answer is indeed the right answer. The issue does not pertain to missing options, but to missing files.
    – Lumi
    May 24, 2019 at 11:28
0

Inside the location where gvim.exe was moved into, create a new directory named vim73. At minimum, the following files and folders should be inside vim73:

  • menu.vim
  • the autoload directory
  • the colors directory

I did not check further which particular files within either the autoload and the colors directories were actually needed, but fulfilling this requirement solved the issue for me.

0

:h guioptions for more information. Vim has a great documentation :)

If you want a quick answer:

if has("gui_running")
  set guioptions-=m     "remove menu bar
  set guioptions-=T     "remove tool bar
  set guioptions-=r     "remove left scroll
  set guioptions-=l     "remove right scroll
endif
1
  • This is more of an rtfm comment than an answer. While it is OK to suggest that the OP read the documentation, if you are going to answer, please provide an answer.
    – MaQleod
    Jul 13, 2012 at 18:46
0

I had this issue and it was driving me nuts. Finally I figured out that I didn't have a VIMRUNTIME environment variable set.

Once I set that to point to the directory where vim was installed, it could then see menu.vim and all was right with the world. So I would make sure to check that.

You must log in to answer this question.

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