Cover by Kim Schulz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Adding your own menu and toolbar buttons

If you are in Gvim, you can make a handy menu with all the functionality you use the most. You might not always need to use it from the menu, but whenever you forget how to use it, you can always just find it there. If you need to get to the functionality really fast, you can even add it directly in the toolbar of Gvim.

In this recipe, we look at both how to make your own menu and, later, how to add extra buttons to the toolbar in Gvim. Let's start with the menu construction.

Adding a menu

Building a menu is basically just executing a command for each item you want in the menu. As long as you follow the right naming convention, you will see a nice little menu with all your items in it.

Let's start with a simple ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required