Vim and Gnome-VFS

I spent a chunk of the weekend implementing Gnome-VFS support in Vim. Originally I had thought to do this by changing the Vim core (in C) by wrapping function calls like open, write, close, stat, etc. to use the gnome-vfs equivalents. I realized that this approach would be a lot of work, though, because those routines are not just used to load/save buffers, but also temporary files and any other IO that Vim does. Auditing all of the code would be very difficult, and in cases where Vim wants to deal with local files, it doesn't make sense to do this via the gnome-vfs functions.

Besides, Vim already has support for ftp, scp and a few other protocols by means of the netrw plugin (which is included in the vim distribution).

I discovered that gnome-vfs ships with a tool called "gnomevfs-copy", which can copy from one uri to another. This is essentially the same thing you do with scp, but much more general, as it works for all valid gnome-vfs uris.

Using gnomevfs-copy, I added gnomevfs support to the netrw plugin. That meant learning a lot more vim-script, but I'm very happy with the result: using nautilus, I can browse to a remote server (for example using sftp), and click to edit a file in gvim. Gnome-vfs supports more schemes than I thought, including ssh, nntp, sftp, network, tar, gzip, https, rio500, ftp, davs, dav, bzip2, smb, pipe, and http. Using the uri-chaining, it's probably also possible to directly edit a file in a gzipped tar file (haven't tried yet, though).

I will be submitting it to netrw's maintainer, but until then you can get it here.

Update: I renamed the file to have a .vim extension (as it should). To install it, just drop it into your ~/.vim/plugin directory (creating this directory if necessary).

Posted by Jason Hildebrand <jason@opensky.ca> Monday Dec 20, 2004 at 11:25 PM

I am happy to see that you are again hacking the interaction between gnome and vim. I wish that I could make time somehow to help, but, as it is, I am merely hopeful that you will soon focus your attention on the interaction between evolution-2 and vim.

I am grateful for your efforts along these lines in the past, and it appears as though your blog site is shaping up.

Good luck, and best wishes for the holiday season!

Your friendly network-neighborhood debian-sid addict who would use evolution at work for interaction with the company's MS-Exchange infrastructure if only evolution would play well with vim,

Thomas

Posted by: Thomas E. Vaughan on Tuesday Dec 21, 2004 at 8:54 AM

Thanks for the encouragement, Thomas. I _am_ currently using vim-bonob with Evolution 2.0, but it has a few glitches, namely signatures aren't working (they don't get inserted into the emails), and the window sizing isn't quite correct. So it's useable, but is a regression from how it worked under Evolution 1.4.

So far I've tolerated these bugs myself, but wanted to fix them before releasing a new evolution .deb. Thanks for being patient.

Posted by: Jason on Tuesday Dec 21, 2004 at 10:41 PM

Considering the historical popularity of vi, I'm surprised this hasn't already been done. As far as you know, has anyone else tried to integrate VIM and GNOME?

Posted by: Eric Radman on Thursday Dec 23, 2004 at 8:27 AM

Eric: Yes and no. Back in 2002 when I first looked at it, the vim source code already had support for compiling Vim to use Gnome dialog boxes and session handling, but no serious work had been done on making Vim into an embeddable component, nor have I seen any efforts to take advantage of gnome-vfs.

I suspect one explanation for this is that although Vim has a large following, many hardcore Vim users still eschew "desktop environments" such as Gnome and KDE. Still, I receive email occasionally asking about Gnome-vim, and my website gets traffic, too, so I know there is at least some interest.

Posted by: Jason on Thursday Dec 23, 2004 at 4:45 PM

Thanks for the work you've done on gnome-vim up until now. It's a good step towards getting a well integrated editor for GNOME. Hopefully one day there will be better support for things like gnome-vfs, a good editor is really one of the last major components that seem to be lacking in GNOME this days.

Posted by: Greg on Saturday Dec 25, 2004 at 11:34 PM

Have you seen this page? http://www.vim.org/sponsor/vote_results.php It's time for you! :]

Posted by: hey on Monday Feb 21, 2005 at 12:15 AM

I love the work on gnome-vfs, works like a charm, except I can't get Nautilus integration to work :'( Thanks though!

Posted by: Robin Haswell on Friday Aug 5, 2005 at 7:35 AM

fantastic! I wanted this so bad, thanks a lot!

Posted by: david on Sunday Feb 11, 2007 at 2:55 AM

s a good step towards getting a well integrated editor for GNOME. Hopefully one day there will be better support for things like gnome-vfs, ed hardy clothesa good editor is really one of the last major components that seem to be lacking in GNOME this days. billig ed hardy kleidung

Posted by: billig ed hardy kleidung on Tuesday Jul 20, 2010 at 11:41 PM

(This oxygen Jordan nike shoes strong sporting activities a nike shox like colorway. light handles the entire quarter nike shox tl, outsole and as well the bottom part within of the nike sb dunks. darkish is place into use as part of your nike shox tl3, mudguard, heel, internal nike dunks, tongue, shoe laces and cheap jordan shoes within of the cheap nike shox. Varsity red-colored accents show up as part of cheap nike shoes, tongue similarly as other minor places near to the nike shoes . I previously stated which i certainly like the oxygen custom nike air force 1 professional Strong. What are you able to think in nike air force 1 to the newest michael jordan shoes? they are provided now at carry out Line. Make self-confident nike air force 1 discover out much more nike air force 1 just following the jump to obtain a increased look. )

Posted by: nike shox on Tuesday Aug 17, 2010 at 10:04 PM

Christian shoes for gorgeous women's is not as general in the States as his Christian Sandals shoes, but also for his distinctively styled handbags. God forgive me, I interviewed Christian Louboutin while wearing a pair of trainers. What remains most identifiably hiphoppish about it is the beat-in-the-body that serves as ground for Classic Christian Louboutin growing-and contradictory-repertoire of lyrical lambaste it leverages.Some of the dressiest elegant Christian Louboutin pumps also feature sparkling rhinestone bands layered along the raised sole and Christian Louboutin heels.

Posted by: Christian shoes on Thursday Aug 26, 2010 at 1:44 AM

UGG Boots is one snowy boot brand which is made of Australian pure wool. It has had over thirty's history. UGG includes except male and female Ugg Bailey Button, sandals, but also the baby shoe. At the first sight of UGG Classic Cardy Boots, people could not fall in love in its stupid cartoon shape at once, but Its thickness, suppleness and leisure win much favor from European and American Stars. UGG Classic Short Boots may let you enjoy the super comfortable warmth in the winter. UGG Sandals blew the prevailing wind continued explosive. Its product line also starts not only to be restricted in the sheep leather boots, gradually increases UGG Classic Tall Boots which is made of the high-quality sheepskin.

Posted by: UGG BOOTS on Thursday Aug 26, 2010 at 1:45 AM
Post a comment
Name:


URL:


Comments: