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

Re: gui dialogs

Expand Messages
  • Reid Thompson
    ... Do you mean like that shown in the attachment? It s the standard gvim search and replace dialog, or is that what you re saying is ugly and stupid? -- You
    Message 1 of 19 , Apr 1, 2010
      On Thu, 2010-04-01 at 17:02 +0300, Aarto Matti wrote:
      > Hello,
      >
      > Is there a way to write more or less complex gui dialog for vim
      > similar to this one
      > http://mrwlwan.files.wordpress.com/2008/03/find_replace.png
      >
      > I would need a couple of text fields and radio(check) buttons in a
      > single dialog. Cream tries to mimic such by splitting a dialog into
      > dozens of basic ones, but that just ugly and stupid.
      >
      > --
      > Aarto
      >

      Do you mean like that shown in the attachment?
      It's the standard gvim search and replace dialog, or is that what you're
      saying is ugly and stupid?

      --
      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, reply using "remove me" as the subject.
    • Aarto Matti
      ... This is ugly and stupid http://www.linux-mag.com/i/articles/6045/Figure_2.jpg The Cream way: a bunch of dialogs, in each you set some option before
      Message 2 of 19 , Apr 1, 2010
        > Do you mean like that shown in the attachment?
        > It's the standard gvim search and replace dialog, or is that what you're
        > saying is ugly and stupid?

        This is ugly and stupid
        http://www.linux-mag.com/i/articles/6045/Figure_2.jpg
        The Cream way: a bunch of dialogs, in each you set some option before
        reaching the final dialog with "Do it already!" button.

        No, I didn't mean that I want a search/replace dialog which already
        exists in vim, I knew, just the screenshot I attached happened to be
        such.

        I was looking for some native way or external toolkit/gui frontend to
        vim to write a custom dialog. Text fields and check(radio) buttons is
        a must.

        --
        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, reply using "remove me" as the subject.
      • Reid Thompson
        ... gvim uses the gtk toolkit. vim is a console application and to my knowledge doesn t support gui interactions -- You received this message from the
        Message 3 of 19 , Apr 1, 2010
          On Thu, 2010-04-01 at 17:35 +0300, Aarto Matti wrote:
          > > Do you mean like that shown in the attachment?
          > > It's the standard gvim search and replace dialog, or is that what you're
          > > saying is ugly and stupid?
          >
          > This is ugly and stupid
          > http://www.linux-mag.com/i/articles/6045/Figure_2.jpg
          > The Cream way: a bunch of dialogs, in each you set some option before
          > reaching the final dialog with "Do it already!" button.
          >
          > No, I didn't mean that I want a search/replace dialog which already
          > exists in vim, I knew, just the screenshot I attached happened to be
          > such.
          >
          > I was looking for some native way or external toolkit/gui frontend to
          > vim to write a custom dialog. Text fields and check(radio) buttons is
          > a must.

          gvim uses the gtk toolkit.
          vim is a console application and to my knowledge doesn't support gui
          interactions

          --
          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, reply using "remove me" as the subject.
        • Aarto Matti
          ... Yeah, I know, but I don t want to hack the vim code. ... But vim does support basic dialogs like inputdialog() and confirm(), I was looking for more
          Message 4 of 19 , Apr 1, 2010
            > gvim uses the gtk toolkit.
            Yeah, I know, but I don't want to hack the vim code.

            > vim is a console application and to my knowledge doesn't support gui
            > interactions

            But vim does support basic dialogs like inputdialog() and confirm(), I
            was looking for more sophisticated ones. I suppose I can use OLE
            interface to interact with others applications, if I decide to write
            the dialog I need with GTK?

            I found VIM Form Toolkit
            http://www.vim.org/scripts/script.php?script_id=2160, unfortunately
            it's not under development anymore.

            I also found this http://www.vim.org/sponsor/vote_results.php and "add
            a portable GUI toolkit for nice dialogs in Vim script" is on the list.
            I hope to see it one day in VIM.

            --
            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, reply using "remove me" as the subject.
          • Tom Link
            ... There are two more plugins of that kind somewhere on the internet. You might also want to check vimuiex, which requires python-support and a patched
            Message 5 of 19 , Apr 1, 2010
              > I found VIM Form Toolkithttp://www.vim.org/scripts/script.php?script_id=2160, unfortunately
              > it's not under development anymore.

              There are two more plugins of that kind somewhere on the internet.

              You might also want to check vimuiex, which requires python-support
              and a patched version of vim though.

              You could use external tools that display a dialog and return some
              kind of value you could work with. Those are often named Xdialog,
              where X is the name of the toolkit being used. Or just "dialog" if
              you're on the terminal.

              If you have python/ruby/perl support compiled in, there might be other
              options.

              You could also think of presenting the users a buffer with a form that
              can be easily parsed and set nomodifiable via CursorMoved(I) if the
              cursor is over a field tag. I use that approach in one plugin and it
              works well for me.

              IMHO in many cases good command-line completion is the better solution
              though.

              --
              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, reply using "remove me" as the subject.
            • Aarto Matti
              ... Found it, looks very interesting! ... Yes, I will consider that as the last option, as I understand it will be a platform specific solution only. Gtk and
              Message 6 of 19 , Apr 5, 2010
                > You might also want to check vimuiex, which requires python-support
                > and a patched version of vim though.

                Found it, looks very interesting!

                >
                > You could use external tools that display a dialog and return some
                > kind of value you could work with. Those are often named Xdialog,
                > where X is the name of the toolkit being used. Or just "dialog" if
                > you're on the terminal.
                >
                > If you have python/ruby/perl support compiled in, there might be other
                > options.

                Yes, I will consider that as the last option, as I understand it will
                be a platform specific solution only. Gtk and Tk dialogs with
                python/ruby/perl are possible under Linux, I don't know about the same
                in Windows 'cause since recently I use vim also in there.

                > You could also think of presenting the users a buffer with a form that
                > can be easily parsed and set nomodifiable via CursorMoved(I) if the
                > cursor is over a field tag. I use that approach in one plugin and it
                > works well for me.

                Could you please share the link to the plugin, if it's public.

                > IMHO in many cases good command-line completion is the better solution
                > though.

                In most cases yes, but sometimes checking a checkbox is faster then
                typing an extra long pattern in command line.

                --
                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, reply using "remove me" as the subject.
              • Tom Link
                ... I used this approach in the following two experiments: http://github.com/tomtom/vimform_vim http://github.com/tomtom/worksheet_vim Neither is actually
                Message 7 of 19 , Apr 8, 2010
                  > > You could also think of presenting the users a buffer with a form that
                  > > can be easily parsed and set nomodifiable via CursorMoved(I) if the
                  > > cursor is over a field tag. I use that approach in one plugin and it
                  > > works well for me.
                  >
                  > Could you please share the link to the plugin, if it's public.

                  I used this approach in the following two experiments:
                  http://github.com/tomtom/vimform_vim
                  http://github.com/tomtom/worksheet_vim

                  Neither is actually useful in its present state.

                  For checkboxes, you had to define a buffer-local map for <LeftMouse>.

                  --
                  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, reply using "remove me" as the subject.
                • Steve Hall
                  From: Tom Link, Thu, April 08, 2010 2:01 pm ... [...gui dialog methods...] If we were to make a gui dialog system for gVim using Python, what would the
                  Message 8 of 19 , Apr 8, 2010
                    From: Tom Link, Thu, April 08, 2010 2:01 pm
                    >
                    [...gui dialog methods...]

                    If we were to make a gui dialog system for gVim using Python, what
                    would the preferable cross-platform (Windows/Linux) be? WxPython?
                    TkInter? PyGTK?

                    I don't think it unreasonable these days to request a user to install
                    Python+toolkit to get a sophisticated dialog system.

                    --
                    Steve Hall [ digitect dancingpaper com ]


                    --
                    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
                  • Tom Link
                    ... One thing I love about vim is that, e.g., the omni completion popup menu works the same in the gui version and in the terminal version. This is also the
                    Message 9 of 19 , Apr 8, 2010
                      > I don't think it unreasonable these days to request a user to install
                      > Python+toolkit to get a sophisticated dialog system.

                      One thing I love about vim is that, e.g., the omni completion popup
                      menu works the same in the gui version and in the terminal version.
                      This is also the reason why I personally would rather like to see text-
                      only GUI widgets.

                      BTW is there a chance the vimuiex patch gets integrated in vim?

                      --
                      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, reply using "remove me" as the subject.
                    • Matt Wozniski
                      ... For a sufficiently simple form, I d instead use a CursorMoved autocmd that detects when the cursor has been moved to the inside of a checkbox. ~Matt --
                      Message 10 of 19 , Apr 8, 2010
                        On Thu, Apr 8, 2010 at 2:01 PM, Tom Link <micathom@...> wrote:
                        >> > You could also think of presenting the users a buffer with a form that
                        >> > can be easily parsed and set nomodifiable via CursorMoved(I) if the
                        >> > cursor is over a field tag. I use that approach in one plugin and it
                        >> > works well for me.
                        >>
                        >> Could you please share the link to the plugin, if it's public.
                        >
                        > I used this approach in the following two experiments:
                        > http://github.com/tomtom/vimform_vim
                        > http://github.com/tomtom/worksheet_vim
                        >
                        > Neither is actually useful in its present state.
                        >
                        > For checkboxes, you had to define a buffer-local map for <LeftMouse>.

                        For a sufficiently simple form, I'd instead use a CursorMoved autocmd
                        that detects when the cursor has been moved to the "inside" of a
                        checkbox.

                        ~Matt

                        --
                        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

                        Subscription settings: http://groups.google.com/group/vim_use/subscribe?hl=en
                      • Steve Hall
                        ... A Graphical User Interface requires graphical elements with which to interface. In the experiments I ve done in Vim with clickable text , it is about the
                        Message 11 of 19 , Apr 8, 2010
                          On Thu, 2010-04-08 at 12:13 -0700, Tom Link wrote:
                          >
                          > ...I personally would rather like to see text-only GUI widgets.

                          A Graphical User Interface requires graphical elements with which to
                          interface. In the experiments I've done in Vim with "clickable text",
                          it is about the most baffling interface non-command liners have ever
                          seen. It doesn't work. (Except for those who would rather just type at
                          the command line. :)

                          Now I suppose if you could create a more "web like" text page,
                          complete with underlines, highlighting, and mouse-overs, then you
                          might have something. Think elinks.cz. But it would be a huge pain,
                          a real GUI toolkit would be much easier.

                          --
                          Steve Hall [ digitect dancingpaper com ]


                          --
                          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
                        • mmarko
                          ... A year ago while developing vimuiex I tried several Python toolkits and the only one that worked was wxPython. The others just crashed Vim when opening a
                          Message 12 of 19 , Apr 8, 2010
                            On 8 apr., 20:20, "Steve Hall" <digit...@...> wrote:
                            > If we were to make a gui dialog system for gVim using Python, what
                            > would the preferable cross-platform (Windows/Linux) be? WxPython?
                            > TkInter? PyGTK?
                            >

                            A year ago while developing vimuiex I tried several Python toolkits
                            and the only one that worked was wxPython. The others just crashed
                            Vim when opening a window. The only problem with wxPython is that
                            you can't make a "modal" window: after you create a window the
                            control passes immediately back to Vim.
                            (this could probably be solved with a loop in Python that would wait
                            for wxApp to close the last window; but then redraw of the main
                            Vim window wouldn't work).

                            If you are interested, you can take a look at version 0.4 of vimuiex
                            where wxPython is still supported.

                            IMO it would be better to implement the dialogs with Python.curses
                            and then port it to use python_screen (patch for vimuiex). I thought
                            about doing that myself, except it would take a lot of time and I
                            don't really need dialogs (vimuiex was started as a utility for
                            browsing
                            temporary lists). You can find an implementation of a simple input
                            field in _popuplist_screen.py. But for a real GUI toolkit it would
                            have
                            to be implemented as a separate class that would be added to
                            dialogs and not as a part of the dialog itself as it is now.

                            Marko

                            --
                            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, reply using "remove me" as the subject.
                          • Andy Wokula
                            ... autoload/forms.vim by Hari Krishna Dara (2006-10-01) http://thread.gmane.org/gmane.editors.vim/47781/ unfort., the googlepages link is dead ... -- Andy --
                            Message 13 of 19 , Apr 9, 2010
                              Am 02.04.2010 06:49, schrieb Tom Link:
                              >> I found VIM Form Toolkithttp://www.vim.org/scripts/script.php?script_id=2160, unfortunately
                              >> it's not under development anymore.
                              >
                              > There are two more plugins of that kind somewhere on the internet.

                              autoload/forms.vim by Hari Krishna Dara (2006-10-01)
                              http://thread.gmane.org/gmane.editors.vim/47781/
                              unfort., the googlepages link is dead ...

                              --
                              Andy

                              --
                              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, reply using "remove me" as the subject.
                            • Tom Link
                              ... You d probably have some difficulties to distinguish between focusing a checkbox and selecting a checkbox. -- You received this message from the vim_use
                              Message 14 of 19 , Apr 10, 2010
                                > For a sufficiently simple form, I'd instead use a CursorMoved autocmd
                                > that detects when the cursor has been moved to the "inside" of a
                                > checkbox.

                                You'd probably have some difficulties to distinguish between focusing
                                a checkbox and selecting a checkbox.

                                --
                                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, reply using "remove me" as the subject.
                              • Tom Link
                                ... I rewrote my library. No mouse-over effects yet but it highlights validation errors, and it has checkboxes and a way to define a field- specific completion
                                Message 15 of 19 , Apr 10, 2010
                                  > Now I suppose if you could create a more "web like" text page,
                                  > complete with underlines, highlighting, and mouse-overs, then you
                                  > might have something. Think elinks.cz. But it would be a huge pain,
                                  > a real GUI toolkit would be much easier.

                                  I rewrote my library. No mouse-over effects yet but it highlights
                                  validation errors, and it has checkboxes and a way to define a field-
                                  specific completion function.

                                  Here is the example code for a Search & Replace form:
                                  http://github.com/tomtom/vimform_vim/blob/master/test/replace_gui.vim

                                  The resulting form would look like this:
                                  http://github.com/downloads/tomtom/vimform_vim/replace_gui.html

                                  --
                                  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, reply using "remove me" as the subject.
                                • Steve Hall
                                  ... Weird, in Firefox this page reports: /tmp/replace_gui-3.html could not be opened, because the associated helper application does not exist. Change the
                                  Message 16 of 19 , Apr 10, 2010
                                    On Sat, 2010-04-10 at 00:09 -0700, Tom Link wrote:
                                    >
                                    > The resulting form would look like this:
                                    > http://github.com/downloads/tomtom/vimform_vim/replace_gui.html

                                    Weird, in Firefox this page reports:

                                    "/tmp/replace_gui-3.html could not be opened, because the associated
                                    helper application does not exist. Change the association in your
                                    preferences."

                                    Looks like something on the server side is broken.

                                    --
                                    Steve Hall [ digitect dancingpaper com ]


                                    --
                                    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, reply using "remove me" as the subject.
                                  • Tom Link
                                    ... Well, ff tries to download the file. Since it is an html file, ff should actually be the default app to open the file. In my case, the file is downloaded
                                    Message 17 of 19 , Apr 11, 2010
                                      > Weird, in Firefox this page reports:
                                      >
                                      >   "/tmp/replace_gui-3.html could not be opened, because the associated
                                      >   helper application does not exist. Change the association in your
                                      >   preferences."
                                      >
                                      > Looks like something on the server side is broken.

                                      Well, ff tries to download the file. Since it is an html file, ff
                                      should actually be the default app to open the file. In my case, the
                                      file is downloaded into the temp directory and then opened with ff.

                                      --
                                      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, reply using "remove me" as the subject.
                                    • Tony Mechelynck
                                      ... The HTML headers for that page include Content-Type: binary/octet-stream (sic), which is not even a valid MIME type: for binary it should be
                                      Message 18 of 19 , Jun 24, 2010
                                        On 10/04/10 16:56, Steve Hall wrote:
                                        > On Sat, 2010-04-10 at 00:09 -0700, Tom Link wrote:
                                        >>
                                        >> The resulting form would look like this:
                                        >> http://github.com/downloads/tomtom/vimform_vim/replace_gui.html
                                        >
                                        > Weird, in Firefox this page reports:
                                        >
                                        > "/tmp/replace_gui-3.html could not be opened, because the associated
                                        > helper application does not exist. Change the association in your
                                        > preferences."
                                        >
                                        > Looks like something on the server side is broken.
                                        >

                                        The HTML headers for that page include "Content-Type:
                                        binary/octet-stream" (sic), which is not even a valid MIME type: for
                                        binary it should be application/octet-stream, but the page is in XHTML,
                                        which mean the correct MIME types would be text/html or (IIRC)
                                        application/xhtml+xml

                                        Best regards,
                                        Tony.
                                        --
                                        Trying to be happy is like trying to build a machine for which the only
                                        specification is that it should run noiselessly.

                                        --
                                        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
                                      Your message has been successfully submitted and would be delivered to recipients shortly.