Am Donnerstag, den 01.06.2006, 16:08 +0200 schrieb Sebastian Menge:
> Or does it mean that i have to compile my own vim with disabled
> gui-support and enabled netbeans?

I forgot to mention what I want to do ...

I want to communicate via the netbenas-protocol with a vim in a
terminal. That vim should not have any X or GUI features.

Is that possible?

If yes, how would I have to ./configure vim? I tried

./configure --enable-gui=no --enable-netbeans

But it doesnt seem to work.

On my ubuntu box 'vim --version' has +netbeans_intg and +X11, is linked
against gnome-libs. If I start my homebrewn netbeans-server, and then
'vim -nb', nothing happens. If I type :gui in the same vim-instance, it
immediatly connects to the server and executes the test command.

Thanks to anyone helping me with this.

regards, Sebastian.

PS: my test server:

start it first, then 'gvim -nb'

---------------
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;

public class VimNBApp {

  private static ServerSocket socket;
  private static Socket vimSocket;

  public static void main(String[] args) {
      try {
        socket = new ServerSocket(3219);
        System.out.print("Server waiting for connection ...");
        vimSocket = socket.accept();
        System.out.println(" connected.");

        PrintWriter out = 
                new PrintWriter(vimSocket.getOutputStream(), true);
        BufferedReader in = 
                new BufferedReader(
                new InputStreamReader(vimSocket.getInputStream()
        ));
          
        //handshake
        System.out.println(in.readLine());
        System.out.println(in.readLine());
        System.out.println(in.readLine());
        
        String cmd = "1:editFile!123 \"/tmp/test.txt\""; 
        out.println(cmd);
        System.out.println("sent: "+cmd);

      } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
  }
-----------------

Reply via email to