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

Re: xembed options for vim?

Expand Messages
  • Marc Weber
    Hi Aljosa, I know about 2 related projects: - one tried running Vim within Eclipse - another group of people tried rewriting Vim or changing it so that it can
    Message 1 of 9 , Jul 1, 2010
      Hi Aljosa,

      I know about 2 related projects:
      - one tried running Vim within Eclipse
      - another group of people tried rewriting Vim or changing it so that it
      can be used as component. That project was given up.
      (I don't recall the names). If its really important to you I'll try to
      dig them up

      You should talk about the overall problem you're faced with. Maybe you
      get more hints then.

      Probably others know more than I do.

      Good luck!
      Marc Weber

      --
      You received this message from the "vim_dev" 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
    • Aljosa Mohorovic
      ... i was interested in http://yzis.org if that s what you mean but like many other projects it died. ... i prefer vim over anything (i ever used or still
      Message 2 of 9 , Jul 1, 2010
        On Jul 1, 3:35 pm, Marc Weber <marco-owe...@...> wrote:
        > - another group of people tried rewriting Vim or changing it so that it
        >   can be used as component. That project was given up.
        > (I don't recall the names). If its really important to you I'll try to
        > dig them up

        i was interested in http://yzis.org if that's what you mean but like
        many other projects it died.

        > You should talk about the overall problem you're faced with. Maybe you
        > get more hints then.

        i prefer vim over anything (i ever used or still using) but it would
        make my life easier if i could embed external app into vim.
        specifically i would like to be able to render a widget with webkit
        capabilities and communicate with that window/widget via python
        plugin.
        i would like to force that widget to behave like vim window so i could
        move it like a normal window.
        basically something like NERDTree but capable to render html5.

        i could also do all this if i can embed vim into another app via
        xembed.

        any idea if something like this is possible or is planed for a future
        vim release?
        also, any other approach or ideas would be appreciated.

        also, i understand that something like this would decrease vim
        performance but i also expect that eventually vim should be able to
        provide better integration with modern ui widgets for vim plugins.

        Aljosa Mohorovic

        --
        You received this message from the "vim_dev" 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
      • Marc Weber
        ... Yes. That was the name. ... I still don t understand? Do you want to replace text fields in HTML documents by Vim ? That would be awesome! Can you create a
        Message 3 of 9 , Jul 1, 2010
          > i was interested in http://yzis.org if that's what you mean but like
          > many other projects it died.
          Yes. That was the name.

          > > You should talk about the overall problem you're faced with. Maybe you
          > > get more hints then.
          > i prefer vim over anything (i ever used or still using) but it would
          > make my life easier if i could embed external app into vim.
          > specifically i would like to be able to render a widget with webkit
          > capabilities and communicate with that window/widget via python
          > plugin.

          I still don't understand? Do you want to replace text fields in HTML
          documents by Vim ? That would be awesome!

          Can you create a small pic illustrating how the result should look like?

          Does this mean you could embed vim into html pages?
          https://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins

          > any idea if something like this is possible or is planed for a future
          > vim release?
          > also, any other approach or ideas would be appreciated.
          Give more details about your idea then. Do you want to have a special
          buffer which is kind of X display?
          The other way should be easy: create a window and embed Vim and your
          other X application.

          > also, i understand that something like this would decrease vim
          > performance but i also expect that eventually vim should be able to
          > provide better integration with modern ui widgets for vim plugins.
          Vim is a historically grown editor I love and hate it. I use it for
          everything which counts more :)

          Marc Weber

          --
          You received this message from the "vim_dev" 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
        • Aljosa Mohorovic
          ... no, i just want to embed another application into vim window. you can completely forget that i mentioned html5, if xembed (or some similar technology)
          Message 4 of 9 , Jul 1, 2010
            On Jul 1, 6:10 pm, Marc Weber <marco-owe...@...> wrote:
            > I still don't understand? Do you want to replace text fields in HTML
            > documents by Vim ? That would be awesome!

            no, i just want to embed another application into vim window.
            you can completely forget that i mentioned html5, if xembed (or some
            similar technology) works in vim anything can be displayed.

            > Give more details about your idea then. Do you want to have a special
            > buffer which is kind of X display?

            i think it's been discussed before but yes, i want a buffer/window/
            anything inside vim that can render more advanced gui elements.
            since gvim uses gtk is it possible to display other gtk elements
            inside gvim window?

            > The other way should be easy: create a window and embed Vim and your
            > other X application.

            could you point me to an existing example?

            Aljosa

            --
            You received this message from the "vim_dev" 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
          • Marc Weber
            ... Sorry I was off topic. ... If you hack gvim then yes. However I think you can t touch the main typing area easily because it basically is a terminal or
            Message 5 of 9 , Jul 1, 2010
              Excerpts from Aljosa Mohorovic's message of Fri Jul 02 01:26:37 +0200 2010:
              > On Jul 1, 6:10 pm, Marc Weber <marco-owe...@...> wrote:
              > > I still don't understand? Do you want to replace text fields in HTML
              > > documents by Vim ? That would be awesome!
              >
              > no, i just want to embed another application into vim window.
              > you can completely forget that i mentioned html5, if xembed (or some
              > similar technology) works in vim anything can be displayed.
              Sorry I was off topic.

              > > Give more details about your idea then. Do you want to have a special
              > > buffer which is kind of X display?
              > i think it's been discussed before but yes, i want a buffer/window/
              > anything inside vim that can render more advanced gui elements.
              > since gvim uses gtk is it possible to display other gtk elements
              > inside gvim window?
              If you hack gvim then yes.
              However I think you can't touch the main typing area easily because it
              basically is a terminal or such.

              > > The other way should be easy: create a window and embed Vim and your
              > > other X application.
              > could you point me to an existing example?
              I don't have one. I mean you could create a gtk/qt app

              +========================+
              | TITLE |
              +========================+
              | | |
              | VIM | YOUR |
              | | GUI |
              | | |
              +========================+

              Then you have to xembed vim at the left and tell it how to display a gui
              at the right (maybe using xembed again).
              I never used xembed so I don't know exactly how it works. glancing at
              some docs found by google it seemed to me being possible.

              Marc Weber

              --
              You received this message from the "vim_dev" 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
            • Andy Spencer
              ... Agreed, if I remember correctly, even the GTK tabs aren t really tabs, but more like buttons that tell the main vim window which tab it should display.
              Message 6 of 9 , Jul 1, 2010
                On 2010-07-02 03:33, Marc Weber wrote:
                > Excerpts from Aljosa Mohorovic's message of Fri Jul 02 01:26:37 +0200 2010:
                > > i think it's been discussed before but yes, i want a buffer/window/
                > > anything inside vim that can render more advanced gui elements.
                > > since gvim uses gtk is it possible to display other gtk elements
                > > inside gvim window?
                >
                > If you hack gvim then yes.
                > However I think you can't touch the main typing area easily because it
                > basically is a terminal or such.

                Agreed, if I remember correctly, even the GTK "tabs" aren't really tabs,
                but more like buttons that tell the main vim window which "tab" it
                should display.


                On 2010-07-02 16:26, Aljosa Mohorovic wrote:
                > On Jul 1, 6:10?pm, Marc Weber <marco-owe...@...> wrote:
                > > The other way should be easy: create a window and embed Vim and your
                > > other X application.
                >
                > could you point me to an existing example?

                This will work, and it's pretty easy to do, I've attached a simple
                example using GtkSocket. What you won't be able to do is treat your GUI
                as a "vim window", e.g.:

                +========================+
                | TITLE |
                +========================+
                | | YOUR |
                | VIM | GUI |
                | |------------|
                | | |
                |-----------| VIM |
                | VIM | |
                +========================+

                --
                You received this message from the "vim_dev" 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
              • Aljosa Mohorovic
                i ve used --servername and --socketid to embed gvim into a qt app but with no success. i can normally embed xterm using this code but with gvim nothing
                Message 7 of 9 , Jul 30, 2010
                  i've used "--servername" and "--socketid" to embed gvim into a qt app
                  but with no success.
                  i can normally embed xterm using this code but with gvim nothing
                  happens although if i use no args (for gvim process) it normally opens
                  gvim outside of qt app.
                  any ideas/tips?

                  Aljosa Mohorovic


                  python/qt code:
                  ---------------------------------------------------------------------
                  # -*- coding: utf-8 -*-
                  import atexit
                  import sys

                  from PyQt4.QtCore import *
                  from PyQt4.QtGui import *

                  class GVim(QX11EmbedContainer):
                  def __init__(self, parent):
                  QX11EmbedContainer.__init__(self, parent)
                  self.process = QProcess(self)
                  self.connect(self.process,
                  SIGNAL("finished(int, QProcess::ExitStatus)"),
                  self.on_cmd_close)
                  atexit.register(self.kill)

                  def kill(self):
                  self.process.kill()
                  self.process.waitForFinished()

                  def show_cmd(self):
                  args = ["--servername", "%d" % self.winId(), "--socketid",
                  "%d" % self.winId()]
                  # args = []
                  print args

                  self.process.start("gvim", args)

                  print "error:", self.process.error()
                  if self.process.error() == QProcess.FailedToStart:
                  print "cmd not installed"

                  def on_cmd_close(self, exit_code, exit_status):
                  print "close", exit_code, exit_status
                  self.close()

                  if __name__ == "__main__":
                  app = QApplication(sys.argv)

                  widget = QMainWindow()
                  cmd = GVim(widget)
                  cmd.show_cmd()
                  cmd.resize(500,500)

                  widget.resize(800,800)
                  widget.show()

                  sys.exit(app.exec_())

                  --
                  You received this message from the "vim_dev" 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
                • Tony Mechelynck
                  ... IIRC, to embed Vim in a Qt app (for instance in a Konqueror tab) you needed a Qt Vim: that would have meant kvim, which however stopped being maintained
                  Message 8 of 9 , Jul 30, 2010
                    On 30/07/10 18:10, Aljosa Mohorovic wrote:
                    > i've used "--servername" and "--socketid" to embed gvim into a qt app
                    > but with no success.
                    > i can normally embed xterm using this code but with gvim nothing
                    > happens although if i use no args (for gvim process) it normally opens
                    > gvim outside of qt app.
                    > any ideas/tips?
                    >
                    > Aljosa Mohorovic

                    IIRC, to embed Vim in a Qt app (for instance in a Konqueror tab) you
                    needed a Qt Vim: that would have meant kvim, which however stopped being
                    maintained when it was at some patchlevel of Vim 6.1. If you have access
                    to some old KDE3 release from a few years ago, it might be included.


                    Best regards,
                    Tony.
                    --
                    The trouble with superheros is what to do between phone booths.
                    -- Ken Kesey

                    --
                    You received this message from the "vim_dev" 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
                  Your message has been successfully submitted and would be delivered to recipients shortly.