Loading ...
Sorry, an error occurred while loading the content.

Re: open file 2nd time should pop up existing gvim window

Expand Messages
  • Bram Moolenaar
    [redirected to vim-dev] ... This has been requested before. I think it s a good enhancement, if it can be implemented in a simple way. I didn t know nedit
    Message 1 of 3 , Apr 30, 2001
    • 0 Attachment
      [redirected to vim-dev]

      Joerg Schoeppe wrote:

      > In FormalPro (a formal verification tool) I can specify an
      > external editor. This can be used to get an crossreference
      > from a schematic to an netlist (in gvim). So I select a gate
      > on the schematic and the netlist file is opened at the
      > appropriate line. If the next gate I select is in the same
      > file on another line an additional gvim with the =5Fsame=5F
      > file is openend. Is there a way to tell gvim to just jump
      > to the line=3F
      >
      > For other editors this work with:
      > EMACS emacs -f start-server
      > emacsclient --nowait +%(l) %(p)
      > XEMACS xemacs -f gnuserv-start
      > gnuclient -q +%(l) %(p)
      > NEDIT nc -noask +%(l) %(p)
      >
      > If this is not possible who thinks this is a good enhancement.

      This has been requested before. I think it's a good enhancement, if it can be
      implemented in a simple way.

      I didn't know nedit supported this. I had a look in how it works, and it
      doesn't look too complicated. It uses X properties on the root window to pass
      the command line from the client to the server. Vim could use a similar
      method. Only for the X windows variations, of course. It requires "write"
      permission on the X server, thus that should take care of security issues.

      I could have a look into this myself, but that would mean I can't work on
      something else. Is there someone who can have a look at the nedit method and
      have an attempt at implementing this for Vim?

      --
      Bad fashion can discourage normal people from interacting with the engineer
      and talking about the cute things their children do.
      (Scott Adams - The Dilbert principle)

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    • Flemming Madsen
      Yes. I have been thinking alittle about this from time to time. This is also (in principle) how remote control works in (Tcl-) TK in netscape and in KDE-DCOP
      Message 2 of 3 , May 1 5:11 AM
      • 0 Attachment
        Yes. I have been thinking alittle about this from time to time.
        This is also (in principle) how remote control works in (Tcl-) TK
        in netscape and in KDE-DCOP (If I understand it correctly )

        I think it would make some sense to be compatible with TK to the point
        where it is possible to emit a (g)vim command from a Tcl/Perl/Python-TK
        script. Of course there should be a vim specific client as well (A small
        standalone program or a vim command line option)

        I could do this, if nobody objects (too much).

        Regards /Flemming


        Bram Moolenaar wrote:
        >
        > [redirected to vim-dev]
        >
        > Joerg Schoeppe wrote:
        >
        > > In FormalPro (a formal verification tool) I can specify an
        > > external editor. This can be used to get an crossreference
        > > from a schematic to an netlist (in gvim). So I select a gate
        > > on the schematic and the netlist file is opened at the
        > > appropriate line. If the next gate I select is in the same
        > > file on another line an additional gvim with the =5Fsame=5F
        > > file is openend. Is there a way to tell gvim to just jump
        > > to the line=3F
        > >
        > > For other editors this work with:
        > > EMACS emacs -f start-server
        > > emacsclient --nowait +%(l) %(p)
        > > XEMACS xemacs -f gnuserv-start
        > > gnuclient -q +%(l) %(p)
        > > NEDIT nc -noask +%(l) %(p)
        > >
        > > If this is not possible who thinks this is a good enhancement.
        >
        > This has been requested before. I think it's a good enhancement, if it can be
        > implemented in a simple way.
        >
        > I didn't know nedit supported this. I had a look in how it works, and it
        > doesn't look too complicated. It uses X properties on the root window to pass
        > the command line from the client to the server. Vim could use a similar
        > method. Only for the X windows variations, of course. It requires "write"
        > permission on the X server, thus that should take care of security issues.
        >
        > I could have a look into this myself, but that would mean I can't work on
        > something else. Is there someone who can have a look at the nedit method and
        > have an attempt at implementing this for Vim?
        >
        > --
        > Bad fashion can discourage normal people from interacting with the engineer
        > and talking about the cute things their children do.
        > (Scott Adams - The Dilbert principle)
        >
        > /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        > ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
        > \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
      • Bram Moolenaar
        ... Well, have a look at the nedit code. It looks quite simle to me. ftp://nedit.sourceforge.net/pub/nedit/nedit-latest-sources.tar.gz The nc.c file contains
        Message 3 of 3 , May 1 11:40 AM
        • 0 Attachment
          Flemming Madsen wrote:

          > Yes. I have been thinking alittle about this from time to time.
          > This is also (in principle) how remote control works in (Tcl-) TK
          > in netscape and in KDE-DCOP (If I understand it correctly )

          Well, have a look at the nedit code. It looks quite simle to me.

          ftp://nedit.sourceforge.net/pub/nedit/nedit-latest-sources.tar.gz

          The nc.c file contains the relevant code.

          > I think it would make some sense to be compatible with TK to the point
          > where it is possible to emit a (g)vim command from a Tcl/Perl/Python-TK
          > script. Of course there should be a vim specific client as well (A small
          > standalone program or a vim command line option)

          Wouldn't it be possible to start Vim with --client or --server? When --client
          is given and no server is found, it can start as a regular Vim (and perhaps
          become a server). I think most application want to start Vim if it wasn't
          there and attach to an already running Vim if it exists. If there are several
          Vims running, and advanced feature would be to find the one that's editing the
          desired file. But let's start with something simple.

          > I could do this, if nobody objects (too much).

          That would be good!

          --
          hundred-and-one symptoms of being an internet addict:
          20. When looking at a pageful of someone else's links, you notice all of them
          are already highlighted in purple.

          /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
          ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
          \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
        Your message has been successfully submitted and would be delivered to recipients shortly.