I'm trying to switch from a mac dev environment to a linux dev environment, but I'm having a few problems. One of them is gvim. I would like to be able to double click a file in nautilus and then have gvim open it in a new tab. I already found how to open a file in a new tab here https://stackoverflow.com/questions/1323790/have-nautilus-open-file-into-new-gvim-buffer but it doesn't focus gvim yet.

Instead when I open a file unity 'wiggles' the gvim icon and I still have to alt-tab to it manually.

Is there a way to open a file in a new gvim tab and focus gvim at the same time? :)

Edit: I forgot to add that I'm using unity 2d on 11.10.


Change the line in your gvim.desktop that says Terminal=false to Terminal=true.

  • This did seem to work a few times. It seems to stop working when I maximize my gvim screen and try to open another file :/. Not sure if that's it though... – acidtv Nov 8 '11 at 18:39
  • will test further and let you know. – Bruno Pereira Nov 8 '11 at 18:46
  • Thanks! After some more testing I can conclude that it works before I maximize the gvim window. After maximizing it stops working until I log out and log in again. It doesn't seem to matter if I use Unity 2D or 3D – acidtv Nov 8 '11 at 18:56
  • no, 2d and 3d should not mather, lets hope someone else gives a more steady answer or give me some more time to sort it out ;) – Bruno Pereira Nov 8 '11 at 18:57

I recommend switching to Gnome Shell. I can confirm there is no problem for me with Nautilus and gvim.


  • I actually quite like unity... – acidtv Nov 8 '11 at 18:10

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.