|No such thing as a small change|
Nautilus helper script to "Open in gvim"by grantm (Parson)
|on Feb 28, 2007 at 08:03 UTC||Need Help??|
My everyday workstation runs GNOME and my editor of choice is gvim. This Perl script can integrate those two tools more tightly.
First of all, did you know that you can use gvim to edit files on remote servers over ssh like this:
Second, did you know that the Nautilus file manager can browse filesystems on remote servers over ssh like this:
Browsing files like that is useful but when you want to edit them you discover that gvim doesn't understand the GNOME VFS URIs. With a little help from Perl, we can translate the ssh:... URIs from GNOME into scp:... URIs for gvim. Save the following script as ~/.gnome2/nautilus-scripts/Open with gvim.
Once you've saved the script and made it executable, if you right-click on a file in Nautilus, you'll find a 'Scripts' sub-menu with the 'Open with gvim' option. You'll find it works for local and remote files.
Both Nautilus and gvim support other protocols (such as ftp:...). You should find it pretty easy to hack in URI translations for those that you need.