History
Article Edit this page Discussion

Launch files in new tabs under Unix

From Vim Tips Wiki

Jump to: navigation, search

Tip 1552 Previous Next Created: April 15, 2008 Complexity: basic Author: MagnusBerg Version: 7.0


Here is how to open files in new tabs, instead of new instances of gvim, under Unix. It works even when you mouse click to open files in a file manager.

Contents

[edit] Desktop entry

In the gvim.desktop desktop file (/usr/share/applications/ for most GNU/Linux systems) look for the "Exec" line. It will probably be like this:

Exec=gvim -f %F

Change the Exec line to:

Exec=gvim -p --remote-tab-silent %F

And in your vimrc add:

tab all

Note: Be aware that the desktop file is changed when you install a new version of gvim, so you may need to repeat the following change after an update.

[edit] alias

You can of course also use an alias:

% alias gvim 'gvim -p --remote-tab-silent'

Most GUI programs don't read aliases, but it is useful if you start gvim from the shell.

[edit] See also

[edit] Comments

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Pixar
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Dark Shadows
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions


Vote for collaboration of the month.

Send this article to a friend
"Launch files in new tabs under Unix"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation