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

Vim script support of socket access or IPC (inter-process communication) ?

Expand Messages
  • pansz
    Hi, For some reason I need to access some local service within vim, this can be Unix socket (d-bus, x message, etc.) or TCP socket (http, ftp, etc.). A typical
    Message 1 of 10 , Dec 14, 2009
    • 0 Attachment
      Hi,

      For some reason I need to access some local service within vim, this can
      be Unix socket (d-bus, x message, etc.) or TCP socket (http, ftp, etc.).

      A typical example is an IM engine, which can provide service to both XIM
      and vimim. The engine may need a relatively long start-up time to build
      the cache and it only need to start once, while vim should start-up very
      fast and run many times. Separate them may be a good idea.

      I found nothing related to socket access or IPC feature in vim script so
      I cannot do that from within vim script. Seek for python or perl support
      is not an option here, since we should not add unnecessary dependency to
      end-users.

      Adding IPC support seems no problem for vim design philosophy, since
      this enables vim interact with other applications better, instead of
      incorporating other application features into vim itself.

      Any hints?

      --
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • just
      2009/12/15 pansz ... Aout the tcp sock,vim can do it whit the help of netrw.vim plugin
      Message 2 of 10 , Dec 15, 2009
      • 0 Attachment
        2009/12/15 pansz <panshizhu@...>
        Hi,

        For some reason I need to access some local service within vim, this can
        be Unix socket (d-bus, x message, etc.) or TCP socket (http, ftp, etc.).

        A typical example is an IM engine, which can provide service to both XIM
        and vimim. The engine may need a relatively long start-up time to build
        the cache and it only need to start once, while vim should start-up very
        fast and run many times. Separate them may be a good idea.

        I found nothing related to socket access or IPC feature in vim script so
        I cannot do that from within vim script. Seek for python or perl support
        is not an option here, since we should not add unnecessary dependency to
        end-users.

        Adding IPC support seems no problem for vim design philosophy, since
        this enables vim interact with other applications better, instead of
        incorporating other application features into vim itself.

        Any hints?

        --
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        Aout the tcp sock,vim can do it whit the help of netrw.vim plugin
        But i suggest that you should download the newest form the writer's website
        here is the address:
        In his website ,you will find netrw.vim and other useful plugin 
        Have fun.


        --
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • pansz
        ... netrw plugin uses external program to do the network access, hence introducing new external dependencies. a standard windows version of gvim cannot use
        Message 3 of 10 , Dec 15, 2009
        • 0 Attachment
          just 写道:
          >> I found nothing related to socket access or IPC feature in vim script so
          >> I cannot do that from within vim script. Seek for python or perl support
          >> is not an option here, since we should not add unnecessary dependency to
          >> end-users.
          >>
          >> Adding IPC support seems no problem for vim design philosophy, since
          >> this enables vim interact with other applications better, instead of
          >> incorporating other application features into vim itself.
          >>
          >> Any hints?
          >
          > Aout the tcp sock,vim can do it whit the help of netrw.vim plugin

          netrw plugin uses external program to do the network access, hence
          introducing new external dependencies.

          a standard windows version of gvim cannot use most features of netrw,
          unless you installed those external programs.

          --
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
        • Charles Campbell
          ... Netrw does provide an interface for vim to several external programs which make file transfer/browsing possible. IMHO, the notion that vim would
          Message 4 of 10 , Dec 16, 2009
          • 0 Attachment
            pansz wrote:
            > just 写道:
            >
            >>> I found nothing related to socket access or IPC feature in vim script so
            >>> I cannot do that from within vim script. Seek for python or perl support
            >>> is not an option here, since we should not add unnecessary dependency to
            >>> end-users.
            >>>
            >>> Adding IPC support seems no problem for vim design philosophy, since
            >>> this enables vim interact with other applications better, instead of
            >>> incorporating other application features into vim itself.
            >>>
            >>> Any hints?
            >>>
            >> Aout the tcp sock,vim can do it whit the help of netrw.vim plugin
            >>
            >
            > netrw plugin uses external program to do the network access, hence
            > introducing new external dependencies.
            >
            > a standard windows version of gvim cannot use most features of netrw,
            > unless you installed those external programs.
            >
            >
            Netrw does provide an interface for vim to several external programs
            which make file transfer/browsing possible. IMHO, the notion that vim
            would incorporate its own code to do zip, gzip, tar, ftp, ssh, etc
            internally is unrealistic.

            Regards,
            Chip Campbell

            --
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
          • Sergey Khorev
            ... Locking on platform-specific stuff like dbus, you effectively lose one of the main Vim advantages: its multiplatformness. Designing some sort of universal
            Message 5 of 10 , Dec 16, 2009
            • 0 Attachment
              > be Unix socket (d-bus, x message, etc.) or TCP socket (http, ftp, etc.).

              Locking on platform-specific stuff like dbus, you effectively lose one
              of the main Vim advantages: its multiplatformness.
              Designing some sort of universal IPC mechanisms would be quite challenging task.

              > Adding IPC support seems no problem for vim design philosophy, since
              > this enables vim interact with other applications better, instead of
              > incorporating other application features into vim itself.

              Vim is single-threaded application. If you want to implement proper
              IPC, for instance, Vim waiting on some event, you will need to rewrite
              much of its core I'm afraid.

              --
              Sergey Khorev
              http://sites.google.com/site/khorser
              Can anybody think of a good tagline I can steal?

              --
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
            • pansz
              ... What if I can expect my communication to respond immediately? Anyway, we can define a timeout, for single-direction or non-blocking IPC . -- You received
              Message 6 of 10 , Dec 17, 2009
              • 0 Attachment
                Sergey Khorev 写道:
                > Vim is single-threaded application. If you want to implement proper
                > IPC, for instance, Vim waiting on some event, you will need to rewrite
                > much of its core I'm afraid.

                What if I can expect my communication to respond immediately?

                Anyway, we can define a timeout, for single-direction or non-blocking IPC .

                --
                You received this message from the "vim_use" maillist.
                For more information, visit http://www.vim.org/maillist.php
              • Tony Mechelynck
                ... Vim already includes (if compiled with the proper features) two mechanisms for inter-process communication: - client-server operation (on both X11 and
                Message 7 of 10 , Feb 1 4:36 AM
                • 0 Attachment
                  On 15/12/09 03:30, pansz wrote:
                  > Hi,
                  >
                  > For some reason I need to access some local service within vim, this can
                  > be Unix socket (d-bus, x message, etc.) or TCP socket (http, ftp, etc.).
                  >
                  > A typical example is an IM engine, which can provide service to both XIM
                  > and vimim. The engine may need a relatively long start-up time to build
                  > the cache and it only need to start once, while vim should start-up very
                  > fast and run many times. Separate them may be a good idea.
                  >
                  > I found nothing related to socket access or IPC feature in vim script so
                  > I cannot do that from within vim script. Seek for python or perl support
                  > is not an option here, since we should not add unnecessary dependency to
                  > end-users.
                  >
                  > Adding IPC support seems no problem for vim design philosophy, since
                  > this enables vim interact with other applications better, instead of
                  > incorporating other application features into vim itself.
                  >
                  > Any hints?
                  >

                  Vim already includes (if compiled with the proper features) two
                  mechanisms for inter-process communication:

                  - client-server operation (on both X11 and Windows)
                  :help remote.txt
                  - OLE (Windows only)
                  :help if_ole.txt

                  Best regards,
                  Tony.
                  --
                  I'm going to Boston to see my doctor. He's a very sick man.
                  -- Fred Allen

                  --
                  You received this message from the "vim_use" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                • pansz
                  ... This is only available for X11 gui console vim with X11 support Windows gui This does not work for: console vim without X11 support (the most wide-spread
                  Message 8 of 10 , Feb 3 12:41 AM
                  • 0 Attachment
                    > Vim already includes (if compiled with the proper features) two
                    > mechanisms for inter-process communication:
                    >
                    > - client-server operation (on both X11 and Windows)
                    > :help remote.txt

                    This is only available for

                    X11 gui
                    console vim with X11 support
                    Windows gui

                    This does not work for:

                    console vim without X11 support (the most wide-spread version)
                    win32 console version of vim


                    > - OLE (Windows only)
                    > :help if_ole.txt


                    It helps when it is more cross-platform.

                    --
                    You received this message from the "vim_use" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                  • Tony Mechelynck
                    Sorry for this late answer ... Windows console ... True; but you can always use gvim -v (if you have a GUI version installed and, of course, X11 started and
                    Message 9 of 10 , Mar 28, 2010
                    • 0 Attachment
                      Sorry for this late answer

                      On 03/02/10 09:41, pansz wrote:
                      >> Vim already includes (if compiled with the proper features) two
                      >> mechanisms for inter-process communication:
                      >>
                      >> - client-server operation (on both X11 and Windows)
                      >> :help remote.txt
                      >
                      > This is only available for
                      >
                      > X11 gui
                      > console vim with X11 support
                      > Windows gui

                      Windows console

                      >
                      > This does not work for:
                      >
                      > console vim without X11 support (the most wide-spread version)

                      True; but you can always use gvim -v (if you have a GUI version
                      installed and, of course, X11 started and available, as in an xterm) as
                      a console-mode Vim on Unix/Linux. If you compile Vim yourelf (a practice
                      which is quite "widespread" on Unix/Linux AFAIK) it will usually be a
                      GUI-enabled version doing double duty as both vim and gvim (and view,
                      gview, etc.), so it will have X11 support.

                      > win32 console version of vim

                      False, see :help w32-clientserver

                      >
                      >
                      >> - OLE (Windows only)
                      >> :help if_ole.txt
                      >
                      >
                      > It helps when it is more cross-platform.
                      >

                      Best regards,
                      Tony.
                      --
                      "Intelligence has much less practical application than you'd think."
                      -- Scott Adams, Dilbert.

                      --
                      You received this message from the "vim_use" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php

                      To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
                    • Yakov
                      You can access sockets API via perl interface that vim has. Yakov -- You received this message from the vim_use maillist. Do not top-post! Type your reply
                      Message 10 of 10 , Mar 29, 2010
                      • 0 Attachment
                        You can access sockets API via perl interface that vim has.

                        Yakov

                        --
                        You received this message from the "vim_use" maillist.
                        Do not top-post! Type your reply below the text you are replying to.
                        For more information, visit http://www.vim.org/maillist.php

                        To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
                      Your message has been successfully submitted and would be delivered to recipients shortly.