Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 http://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.

share|improve this question

2 Answers 2

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

share|improve this answer
    
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.

http://www.omgubuntu.co.uk/2011/10/gnome-shell-ubuntu-11-10-guide/

share|improve this answer
    
I actually quite like unity... –  acidtv Nov 8 '11 at 18:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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