Is there a way to configure nautilus to open a file into an existing gvim process in a new buffer instead of loading a new instance of gvim? I know I can drag and drop the file into gvim, but it would be convenient if I could just double-click a file to open it.
A:
Perhaps you can write a shell script to automate this if Gvim provides the functionality. I personally do not know enough to provide the details. Just a direction to try?
Brandon Pelfrey
2009-08-24 17:57:39
+1
A:
You're really just wanting to launch gVim with the --remote-tab-silent option. From the manual:-
*--remote-tab-silent*
--remote-tab-silent
Like --remote-silent but open each file in a new tabpage.
Also just check out --remote-silent if you're not wanting a new tab and want to create a new buffer.
Gavin Gilmour
2009-08-24 18:01:05
Any idea where gnome configures which program is associated with text files? System -> Preferences -> Preferred Applications seems to be the right area, but it doesn't allow you to pick a text editor there . . .
CMB
2009-08-24 18:59:18
I'm on a mac so I'm not 100%, but you could try this :- http://www.howtogeek.com/howto/ubuntu/add-open-with-gedit-to-the-right-click-menu-in-ubuntu/ and use this script instead:- http://pastebin.com/m7abf308e It might do the trick.
Gavin Gilmour
2009-08-24 19:30:24
+1
A:
In a Terminal
cd ~/.local/share/applications
vi gvim-tab.desktop
Copy Paste this code :
[Desktop Entry]
Encoding=UTF-8
Name=GVim Text Editor (Tabs)
Comment=Edit text files in a new tab
Exec=gvim --remote-tab %F
Terminal=false
Type=Application
Icon=/usr/share/pixmaps/vim.svg
Categories=Application;Utility;TextEditor;
StartupNotify=true
MimeType=text/plain;
NoDisplay=true
In Nautilus
Right-Click in a text file
Open With
Open with a another application
Select "GVim Text Editor (Tabs)"
It's done
Touv
2009-09-01 12:34:37