Warning: Use of undefined constant USERLEN - assumed 'USERLEN' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/functions.php on line 31

Warning: Use of undefined constant AMZSRVLINK - assumed 'AMZSRVLINK' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/functions.php on line 410

Warning: Use of undefined constant AMZSRVTAGS - assumed 'AMZSRVTAGS' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/functions.php on line 412

Warning: Use of undefined constant AMZIMG160 - assumed 'AMZIMG160' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/functions.php on line 415

Warning: Use of undefined constant AMZIMG110 - assumed 'AMZIMG110' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/functions.php on line 417

Warning: Use of undefined constant AMZPPSLINK - assumed 'AMZPPSLINK' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/functions.php on line 421

Warning: Use of undefined constant AMZAFFLINK - assumed 'AMZAFFLINK' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/functions.php on line 424
Open Multiple Text Files as Tabs in GVim on KDE 4

Open Multiple Text Files as Tabs in GVim on KDE 4


Warning: Use of undefined constant woothemes - assumed 'woothemes' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/single.php on line 19
// June 18th, 2011 // Posted in Linux, Vim // Tagged as , , ,

This journal is on how to open multiple text files from Dolphin file manager and display them as tabs in GVim. In this example I’m using Linux Mint 9 KDE with KDE 4.4.5 on it.

Linux Mint KDE is my primary workstation at home and I think Dolphin is the best file manager for Linux. I use Dolphin to navigate my workspace and source codes. Many times I use Right-Click -> “Open With” -> “GVim Text Editor” to quickly edit files. The issue is that the default behavior will spawn multiple instances of GVim for each files while what I want is for GVim to have one instance only and open those files in tabs.

To change it we need to modify on how GVim got spawned by Dolphin. On Linux Mint 10 it’s defined in a file /usr/share/applications/gvim.desktop which we need to edit.

Inside that file we need to change 2 lines. The first one is the “Exec” line. On my machine by default it says:

Exec=gvim -f %F

We need to change it to:

Exec=/usr/bin/gvim -font "Inconsolata Medium 11" --remote-tab-silent %F

The flag “–remote-tab-silent” will make GVim stays with one instance only while the -font flag will tell GVim to load specific fonts instead of default one.

The second line that we need to change is the “StartupNotify“. By default on my machine it says:
StartupNotify=true

I just change it to:
StartupNotify=false

without flipping it to false whenever GVim got spawned it will also spawn a shell in the background.

Please share this journal with others:


Warning: Use of undefined constant woothemes - assumed 'woothemes' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/comments.php on line 18

Warning: Use of undefined constant woothemes - assumed 'woothemes' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/comments.php on line 18

Warning: Use of undefined constant woothemes - assumed 'woothemes' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/comments.php on line 18
2 Responses to “Open Multiple Text Files as Tabs in GVim on KDE 4”

  1. Bernhard Heijstek says:

    Awesome post mate. Really helped. Changing StartupNotify from “true” to “false” was the key. Thanks a lot!

  2. pietra says:

    Hi Bernhard,

    Glad it works for you.


Warning: Use of undefined constant woothemes - assumed 'woothemes' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/comments.php on line 46

Warning: Use of undefined constant woothemes - assumed 'woothemes' (this will throw an Error in a future version of PHP) in /home/public/wp-content/themes/irresistible/comments.php on line 46
Leave a Reply