Open files in gvim in new tabs

Aim: when hitting F4 in GnomeCommander, the file will open in a new tab of the existing gvim instance:
Options1: visual:

  1. Open Gnome Commander => Settings => Options => Programs
  2. In the Edit text field put this:
    gvim -p --remote-tab-silent %s
  3. Save and restart Gnome Commander – not always needed, but helps

Option 2: editing the settings file:

  1. The file to edit is ~/.gnome2/gnome-commander
  2. Find the line :editor=blablabla and change it to :
    editor=gvim -p --remote-tab-silent %s
  3. Save and restart gnome-commander
Advertisement

3 thoughts on “Open files in gvim in new tabs

  1. What does the %s mean? I’ve seen %F and %U at places as well, what’s the difference? Where can i read up on these variables?

    • %s is used as a placeholder for the file name. Gnome Commander replaces it with the actual file name you have selected when invoking the command.

      As for specific documentation – I haven’t looked; just needed to get this enabled so I got inspired by the default syntax for editing files in Gnome Commander via Gedit

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s