Most of the time I can browse the file system with the file browser, right-click on a file and top item in the menu "Open with Gvim", but when I right-click on a .c or .h file, it says "Open with (some inferior editor)". I mouse over to the "Open With" submenu, and Gvim doesn't appear in there, either. Even when I go into "Other Application" and browse through the programs, it doesn't show up. What gives?

  • It shows up for me in the "Open With" menu. Do you have vim-gtk or vim-gnome installed? Have you done anything to customize or change the package contents? Do you have a custom launcher for gvim in ~/.local/share/applications? – Mike Miller Jun 26 '14 at 3:02
  • I have vim-gnome installed. I don't think I've done anything to change or customize the package, just my .vimrc and .vim folder. Yes! I made a custom launcher that looks like:[Desktop Entry] Version=1.0 Name=Gvim Comment=The best text editor Exec=/usr/bin/gvim --remote-tab-silent Icon=/usr/share/app-install/icons/vim.svg Terminal=false Type=Application Categories=Utility;Application; – Matt Gregory Jun 27 '14 at 0:54

In your reply in the comments, you said you have created a custom launcher for GVim. In your custom desktop launcher, you neglected to include the MimeType keyword. The .desktop file is not only used to add applications to the desktop environment menu, but also to register applications with the MIME types that they can handle.

So to register GVim as a text editor with your desktop environment, your custom gvim.desktop file should contain at least the following:

[Desktop Entry]
Comment=Edit text files
Exec=gvim --remote-tab-silent %F

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.