Vim Tips Wiki

Using remote editing with knetattach

Redirected from VimTip1332

1,624pages on
this wiki
Add New Page
Talk0 Share
Tip 1332 Printable Monobook Previous Next

created 2006 · complexity basic · version 6.0

I was trying kde's knetattach yesterday. It doesn't seem to know about Vim's built-in remote editing commands. To get knetattach to play nicely with Vim, I wrote the following Python script and made it the default application for remote text files. The application command line reads " %u", where %u is translated to the remote fish url.


import os, sys

def open_gvim():
  v = sys.argv[1];
  if v[0:4] != 'fish':
    error_file = open('.net_vim_errors','a');
    print >> error_file, "Error starting gvim";
    print >> error_file, sys.argv;
    v = v.replace("fish:", "scp:", 1);
    v = v.replace(":22", "/", 1);
    cmd = ' '.join(['gvim',v]);



Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki