rogual / neovim-dot-app

Mac OS X GUI for Neovim
1.13k stars 62 forks source link

Is it possible to implement a remote C-S gui? #255

Open h4x3rotab opened 8 years ago

h4x3rotab commented 8 years ago

As far as I know, lots of people need to work with gvim by ssh x11 forwarding. Because they need vim running on remote server and with modern gui. X11 forwarding is a ugly workaround. User experience become hell when network condition is bad.

I always want a client-server mode gvim: run a vim core on remote machine and run the gui part locally. This is hard to implement in traditional vim but I think it's possible with neovim. In my understanding, most of gui talk to nvim by rpc. Currently it looks like neovim-dot-app does rpc under unix pipe. So I'm wondering if we can make rpc running on socket, which enables remote ability for neovim gui.

h4x3rotab commented 8 years ago

I've made a concept validation demo: https://github.com/h4x3rotab/neovim-dot-app/commit/a14129a6597c6fe755685e7ccd64d760aa0745f8

Here is how I tested it:

  1. Run a neovim with NVIM_LISTEN_ADDRESS=127.0.0.1:6669 on remote machine.
  2. Forward the remote port to local by ssh -L 6669:127.0.0.1:6669 hostname.
  3. Launch Neovim.app.

Currently it looks like a terminal emulator: no scroll bar, no native tabs, broken copy & paste support. However, it just works. I can even edit remote file with Youcompleteme plugin!

rogual commented 8 years ago

Nice work! This would be a great feature to support.

no scroll bar, no native tabs

Neovim.app never had these anyway :)

broken copy & paste support

Tricky... but not insurmountable.