Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want it in such a way that on double clicking an already opened file, or a new file, gVim uses the same window. From this question asked previously on Stackoverflow I figured out how to do this by putting up an alias like:

alias gvim="gvim --remote-tab-silent" || gvim

This works great for the terminal without any problems. To enable this for the desktop too, I tried editing the /usr/share/applications/gvim.desktop. The default execution command in gvim.desktop is:

gvim -f %F

I changed this to:

gvim --remote-tab-silent %F

This gives me trouble when I'm trying to open an already opened file. It takes too long to open and doesn't open in the end. What may have caused the problem? I'm running Gnome 2.x and Vim 7.2.x if it matters.

share|improve this question
    
According to this, it should work almost this way - in the answer, gvim is substituted with gvim --remote-tab-silent, which would keep the -f parameter. I'm not sure but maybe this is the issue? –  sr_ Oct 24 '11 at 11:24
add comment

1 Answer

up vote 0 down vote accepted

Changing StartupNotify from true to false in /usr/share/applications/gvim.desktop solves the problem.

Source: http://www.phacks.net/open-multiple-text-files-as-tabs-gvim-kde4/

share|improve this answer
add comment

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.