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

Re: gestures

Expand Messages
  • björn
    ... Hi Mark (and vim_mac), It s been a long time since this thread was started but I have now implemented rudimentary gesture support for MacVim. With the
    Message 1 of 18 , Sep 1, 2010
      On 18 February 2010 23:03, Mark Santcroos wrote:
      > On Thu, Feb 18, 2010 at 5:24 PM, björn wrote:
      >> On 17 February 2010 15:22, Mark Santcroos wrote:
      >>> Recently I'm trying MacVim again over vanilla vim.
      >>> Anyone has been looking into, trying, considering using gestures?
      >>>
      >>> One usage scenario that I would like to have is tab-switching.
      >>
      >> By "gestures" I assume you mean the various swipes/pinches etc. that
      >> can be done on the track pads of the later model MacBooks?  I've never
      >> looked into this but it doesn't seem like it would be too hard to add
      >> support to bind to these.  Sounds like it could be useful too.
      >>
      >> Would anybody want to look into this?  (I'll add it to my todo but it
      >> will take several weeks before I can look into this.)
      >
      > I can look into it myself, but wanted to check if it was worth investigating.
      > I'll try to come up with a patch.

      Hi Mark (and vim_mac),

      It's been a long time since this thread was started but I have now
      implemented rudimentary gesture support for MacVim.

      With the latest source code version there are now several new pseudo keys:

      <SwipeLeft> <SwipeRight> <SwipeUp> <SwipeDown>
      <PinchIn> <PinchOut>
      <RotateCW> <RotateCCW>

      For instance, the following (rather dull) maps let you change buffers
      by swiping:

      nmap <SwipeLeft> :bN<CR>
      nmap <SwipeRight> :bn<CR>

      All new keys are bound to nothing by default (I could not think of any
      "natural" default bindings for them).

      Note that the Pinch/Rotate keys generate a lot of events in one go so
      I'm not sure they will be very useful at this point in time. The
      swipe keys are more "reliable".

      I can't think of anything really useful for this feature yet -- does
      anybody have any neat ideas?

      Björn

      --
      You received this message from the "vim_mac" 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
    • Vincent Berthoux
      Hi, What about this commands : nnoremap gt nnoremap gT this way, the swipe allow us to switch around the opened tabs, which quite fit
      Message 2 of 18 , Sep 1, 2010
        Hi,

        What about this commands :
        nnoremap <SwipeLeft> gt
        nnoremap <SwipeRight> gT

        this way, the swipe allow us to switch around the opened tabs, which quite fit the gesture idea.

        A more complex machinery could be used to allow the user to change font size with the Pinchin/Pinchout, but it might need a more consequent vimscript to handle it.

        Vincent Berthoux

        Le 1 sept. 2010 à 16:57, björn a écrit :

        > On 18 February 2010 23:03, Mark Santcroos wrote:
        >> On Thu, Feb 18, 2010 at 5:24 PM, björn wrote:
        >>> On 17 February 2010 15:22, Mark Santcroos wrote:
        >>>> Recently I'm trying MacVim again over vanilla vim.
        >>>> Anyone has been looking into, trying, considering using gestures?
        >>>>
        >>>> One usage scenario that I would like to have is tab-switching.
        >>>
        >>> By "gestures" I assume you mean the various swipes/pinches etc. that
        >>> can be done on the track pads of the later model MacBooks? I've never
        >>> looked into this but it doesn't seem like it would be too hard to add
        >>> support to bind to these. Sounds like it could be useful too.
        >>>
        >>> Would anybody want to look into this? (I'll add it to my todo but it
        >>> will take several weeks before I can look into this.)
        >>
        >> I can look into it myself, but wanted to check if it was worth investigating.
        >> I'll try to come up with a patch.
        >
        > Hi Mark (and vim_mac),
        >
        > It's been a long time since this thread was started but I have now
        > implemented rudimentary gesture support for MacVim.
        >
        > With the latest source code version there are now several new pseudo keys:
        >
        > <SwipeLeft> <SwipeRight> <SwipeUp> <SwipeDown>
        > <PinchIn> <PinchOut>
        > <RotateCW> <RotateCCW>
        >
        > For instance, the following (rather dull) maps let you change buffers
        > by swiping:
        >
        > nmap <SwipeLeft> :bN<CR>
        > nmap <SwipeRight> :bn<CR>
        >
        > All new keys are bound to nothing by default (I could not think of any
        > "natural" default bindings for them).
        >
        > Note that the Pinch/Rotate keys generate a lot of events in one go so
        > I'm not sure they will be very useful at this point in time. The
        > swipe keys are more "reliable".
        >
        > I can't think of anything really useful for this feature yet -- does
        > anybody have any neat ideas?
        >
        > Björn
        >
        > --
        > You received this message from the "vim_mac" 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

        --
        You received this message from the "vim_mac" 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
      • J Irving
        ... Until recently, I was using a FingerWorks Gesture Pad. Sadly they re out of business now, and I won t be able to replace it when it dies (and it s getting
        Message 3 of 18 , Sep 1, 2010
          On Wed, Sep 1, 2010 at 16:57, björn <bjorn.winckler@...> wrote:
          > I can't think of anything really useful for this feature yet -- does
          > anybody have any neat ideas?

          Until recently, I was using a FingerWorks Gesture Pad. Sadly they're
          out of business now, and I won't be able to replace it when it dies
          (and it's getting creaky). One of the gesture combos I used a fair
          bit was <PinchOut> to paste, and (used less) <PinchIn> to copy. Not
          sure it would make sense to bind it to the vim equivalents, but I'd
          sure like it if I could get my trackpad and magicpad doing that.

          Is there any way to bind to bind to the OS X paste function in MacVim?

          cheers, J

          --
          You received this message from the "vim_mac" 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
        • Keyan
          ... hi, this sounds like a cool feature, but unfortunately they dont seem to work for me. i tried with my magic mouse and with the touchpad. i am currently
          Message 4 of 18 , Sep 2, 2010
            On 1 Sep 2010, at 22:57, björn wrote:

            > nmap <SwipeLeft> :bN<CR>
            > nmap <SwipeRight> :bn<CR>

            hi,

            this sounds like a cool feature, but unfortunately they dont seem to work for me. i tried with my magic mouse and with the touchpad.

            i am currently using MacVim

            :version
            VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 15 2010 22:03:01)

            regards,
            keyan

            --
            You received this message from the "vim_mac" 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
          • björn
            ... This doesn t sound very useful to me: isn t it easier to just click the tab you want to go to? (Or have fewer tabs open if they can t all fit in the
            Message 5 of 18 , Sep 2, 2010
              On 1 September 2010 23:05, Vincent Berthoux wrote:
              >
              >   What about this commands :
              > nnoremap <SwipeLeft> gt
              > nnoremap <SwipeRight> gT
              >
              > this way, the swipe allow us to switch around the opened tabs, which quite fit the gesture idea.

              This doesn't sound very useful to me: isn't it easier to just click
              the tab you want to go to? (Or have fewer tabs open if they can't all
              fit in the tabline.)

              > A more complex machinery could be used to allow the user to change font size with the Pinchin/Pinchout, but it might need a more consequent vimscript to handle it.

              If the gestures are to be useful I think they'd need to be bound to
              something that you use fairly often, and how often do you change the
              font size? I think they also should be associated with something that
              currently can't be done when your hands are off the keyboard -- so,
              something to do with viewing files but that cannot already be done
              using the mouse...

              Thanks for you thoughts though!

              Björn

              --
              You received this message from the "vim_mac" 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
            • björn
              ... In their current state PinchIn/Out generate _many_ events during one pinch movement so this would not work at the moment. (It may be worth fixing the
              Message 6 of 18 , Sep 2, 2010
                On 1 September 2010 23:08, J Irving wrote:
                > On Wed, Sep 1, 2010 at 16:57, björn wrote:
                >> I can't think of anything really useful for this feature yet -- does
                >> anybody have any neat ideas?
                >
                > Until recently, I was using a FingerWorks Gesture Pad.  Sadly they're
                > out of business now, and I won't be able to replace it when it dies
                > (and it's getting creaky).  One of the gesture combos I used a fair
                > bit was <PinchOut> to paste, and (used less) <PinchIn> to copy.  Not
                > sure it would make sense to bind it to the vim equivalents, but I'd
                > sure like it if I could get my trackpad and magicpad doing that.

                In their current state PinchIn/Out generate _many_ events during one
                pinch movement so this would not work at the moment. (It may be worth
                fixing the pinch/rotate gestures so that they only generate one event
                per pinch/rotate movement, but I'll leave that to somebody else for
                now.)

                >
                > Is there any way to bind to bind to the OS X paste function in MacVim?

                You can e.g. bind to "+gP, or ":emenu Edit.Paste", or ...

                Björn

                --
                You received this message from the "vim_mac" 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
              • Mark Santcroos
                Hi Björn, ... Cool! I had given it a try myself, but a new language and too much code was a bit too daunting for me at the time :-) ... See below. ... I fully
                Message 7 of 18 , Sep 2, 2010
                  Hi Björn,

                  > Le 1 sept. 2010 à 16:57, björn a écrit :
                  >> Hi Mark (and vim_mac),
                  >>
                  >> It's been a long time since this thread was started but I have now
                  >> implemented rudimentary gesture support for MacVim.

                  Cool! I had given it a try myself, but a new language and too much
                  code was a bit too daunting for me at the time :-)

                  >> I can't think of anything really useful for this feature yet -- does
                  >> anybody have any neat ideas?

                  See below.

                  On Wed, Sep 1, 2010 at 23:05, Vincent Berthoux <twinside@...> wrote:
                  > What about this commands :
                  > nnoremap <SwipeLeft> gt
                  > nnoremap <SwipeRight> gT
                  >
                  > this way, the swipe allow us to switch around the opened tabs, which quite fit the gesture idea.

                  I fully support this usage from Vincent, it was exactly what I had in
                  mind at the time and I like it already.
                  It is confirming with my Firefox tab switching. And it is really
                  faster than clicking the tab if you are browsing through text and you
                  are not near the top.

                  Regards from a happy customer,

                  Mark

                  --
                  You received this message from the "vim_mac" 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
                • björn
                  ... Ok! Still not my cup of tea though. :-) I did however think of something that I am considering to make a MacVim default mapping, namely: nmap
                  Message 8 of 18 , Sep 2, 2010
                    On 2 September 2010 13:31, Mark Santcroos wrote:
                    >> Le 1 sept. 2010 à 16:57, björn a écrit :
                    >
                    > On Wed, Sep 1, 2010 at 23:05, Vincent Berthoux <twinside@...> wrote:
                    >>   What about this commands :
                    >> nnoremap <SwipeLeft> gt
                    >> nnoremap <SwipeRight> gT
                    >>
                    >> this way, the swipe allow us to switch around the opened tabs, which quite fit the gesture idea.
                    >
                    > I fully support this usage from Vincent, it was exactly what I had in
                    > mind at the time and I like it already.
                    > It is confirming with my Firefox tab switching. And it is really
                    > faster than clicking the tab if you are browsing through text and you
                    > are not near the top.

                    Ok! Still not my cup of tea though. :-)

                    I did however think of something that I am considering to make a
                    MacVim default mapping, namely:

                    nmap <buffer> <SwipeLeft> :po<CR>
                    nmap <buffer> <SwipeRight> :ta<CR>

                    in $VIMRUNTIME/ftpluging/help.vim. This way it is possible to go
                    back/forward in the help files using swipe (but this _only_ applies to
                    help files, so swipe can still be bound to whatever in other buffers).
                    I just tried it out and it makes navigating the help a lot more
                    pleasant! Comments?

                    I also noticed that the swipe key will affect the "focused" view
                    instead of the one that the mouse cursor is over which feels a bit
                    unintuitive. I'll put it on my todo to fix this. Uh, and swiping in
                    cmdline mode inserts <SwipeXXX> into the cmdline...annoying, will fix
                    this too.

                    Björn

                    --
                    You received this message from the "vim_mac" 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
                  • Steven Michalske
                    ... This is a matter of taste, and depends on the action i d say. might there be a setting for focus follows, or focused? Focus follows mouse is on of the
                    Message 9 of 18 , Sep 2, 2010
                      On Sep 2, 2010, at 7:54 AM, björn wrote:

                      > On 2 September 2010 13:31, Mark Santcroos wrote:
                      >>> Le 1 sept. 2010 à 16:57, björn a écrit :
                      >>
                      >> On Wed, Sep 1, 2010 at 23:05, Vincent Berthoux <twinside@...> wrote:
                      >>> What about this commands :
                      >>> nnoremap <SwipeLeft> gt
                      >>> nnoremap <SwipeRight> gT
                      >>>
                      >>> this way, the swipe allow us to switch around the opened tabs, which quite fit the gesture idea.
                      >>
                      >> I fully support this usage from Vincent, it was exactly what I had in
                      >> mind at the time and I like it already.
                      >> It is confirming with my Firefox tab switching. And it is really
                      >> faster than clicking the tab if you are browsing through text and you
                      >> are not near the top.
                      >
                      > Ok! Still not my cup of tea though. :-)
                      >
                      > I did however think of something that I am considering to make a
                      > MacVim default mapping, namely:
                      >
                      > nmap <buffer> <SwipeLeft> :po<CR>
                      > nmap <buffer> <SwipeRight> :ta<CR>
                      >
                      > in $VIMRUNTIME/ftpluging/help.vim. This way it is possible to go
                      > back/forward in the help files using swipe (but this _only_ applies to
                      > help files, so swipe can still be bound to whatever in other buffers).
                      > I just tried it out and it makes navigating the help a lot more
                      > pleasant! Comments?
                      >
                      > I also noticed that the swipe key will affect the "focused" view
                      > instead of the one that the mouse cursor is over which feels a bit
                      > unintuitive. I'll put it on my todo to fix this.

                      This is a matter of taste, and depends on the action i'd say. might there be a setting for focus follows, or focused?
                      Focus follows mouse is on of the features that I sorely miss from my unix days. I know that I liked the configurability of it ignored the desktop but other windows it would follow, and that would drive others nuts.

                      > Uh, and swiping in
                      > cmdline mode inserts <SwipeXXX> into the cmdline...annoying, will fix
                      > this too.
                      >
                      > Björn
                      >
                      > --
                      > You received this message from the "vim_mac" 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

                      --
                      You received this message from the "vim_mac" 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
                    • Mark Santcroos
                      Hi, You need to check out from git. The change went in two days ago. Mark ... -- You received this message from the vim_mac maillist. Do not top-post! Type
                      Message 10 of 18 , Sep 3, 2010
                        Hi,

                        You need to check out from git. The change went in two days ago.

                        Mark

                        On 2 sep. 2010, at 11:10, Keyan <key.vim@...> wrote:

                        >
                        > On 1 Sep 2010, at 22:57, björn wrote:
                        >
                        >> nmap <SwipeLeft> :bN<CR>
                        >> nmap <SwipeRight> :bn<CR>
                        >
                        > hi,
                        >
                        > this sounds like a cool feature, but unfortunately they dont seem to work for me. i tried with my magic mouse and with the touchpad.
                        >
                        > i am currently using MacVim
                        >
                        > :version
                        > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 15 2010 22:03:01)
                        >
                        > regards,
                        > keyan
                        >
                        > --
                        > You received this message from the "vim_mac" 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

                        --
                        You received this message from the "vim_mac" 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
                      • Keyan
                        thanks, my 2 cent opionen: i heavily use buffers, and don t use tabs at all. so i like the first proposed option of switching buffers by default. on the other
                        Message 11 of 18 , Sep 3, 2010
                          thanks,

                          my 2 cent opionen: i heavily use buffers, and don't use tabs at all. so i like the first proposed option of switching buffers by default. on the other hand, i don't mind configuring it myself.

                          cheers,
                          keyan



                          On 3 Sep 2010, at 11:11, Mark Santcroos wrote:

                          > Hi,
                          >
                          > You need to check out from git. The change went in two days ago.
                          >
                          > Mark
                          >
                          > On 2 sep. 2010, at 11:10, Keyan <key.vim@...> wrote:
                          >
                          >>
                          >> On 1 Sep 2010, at 22:57, björn wrote:
                          >>
                          >>> nmap <SwipeLeft> :bN<CR>
                          >>> nmap <SwipeRight> :bn<CR>
                          >>
                          >> hi,
                          >>
                          >> this sounds like a cool feature, but unfortunately they dont seem to work for me. i tried with my magic mouse and with the touchpad.
                          >>
                          >> i am currently using MacVim
                          >>
                          >> :version
                          >> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 15 2010 22:03:01)
                          >>
                          >> regards,
                          >> keyan
                          >>
                          >> --
                          >> You received this message from the "vim_mac" 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
                          >
                          > --
                          > You received this message from the "vim_mac" 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

                          --
                          You received this message from the "vim_mac" 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
                        • David Patrick Henderson
                          I have to question the use of gesture input in a text editor. What is the purpose and how does it improve user interaction/experience? Other than swiping to
                          Message 12 of 18 , Sep 3, 2010
                            I have to question the use of gesture input in a text editor. What is the purpose and how does it improve user interaction/experience? Other than swiping to change buffers or tabs, there is no seeming natural fit for gestures that make sense. So the question is, other than coolness how does this interaction improve the user's experience with vim? I, for one, am not at all certain how gestures would improve or increase my productivity in vim. Let us not forget the purpose of vim is as an editor of text, so I ask, do gestures in fact bring an improvement to editing in vim or are they a feature for feature's sake?

                            Dave Henderson
                            --
                            "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult."
                            -- C. A. R. "Tony" Hoare

                            --
                            You received this message from the "vim_mac" 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
                          • dacresni
                            I was about to ask the same thing, isn t its purpose to reduce interruptions of keyboard use for the mouse. (they say every time you move your hand from the
                            Message 13 of 18 , Sep 3, 2010
                              I was about to ask the same thing, isn't its purpose to reduce
                              interruptions of keyboard use for the mouse. (they say every time you
                              move your hand from the keyboard to the mouse God kills a hamster)

                              On Sep 3, 9:33 am, David Patrick Henderson <dp.chaoswe...@...>
                              wrote:
                              > I have to question the use of gesture input in a text editor. What is the purpose and how does it improve user interaction/experience? Other than swiping to change buffers or tabs, there is no seeming natural fit forgesturesthat make sense. So the question is, other than coolness how does this interaction improve the user's experience with vim? I, for one, am not at all certain howgestureswould improve or increase my productivity in vim. Let us not forget the purpose of vim is as an editor of text, so I ask, dogesturesin fact bring an improvement to editing in vim or are they a feature for feature's sake?
                              >
                              > Dave Henderson
                              > --
                              > "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult."
                              >     -- C. A. R. "Tony" Hoare

                              --
                              You received this message from the "vim_mac" 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
                            • Keyan
                              i am a mac book pro user, and i do not always use an external keyboard and mouse. the touchpad is easily reached while editing, and without me needing to move
                              Message 14 of 18 , Sep 3, 2010
                                i am a mac book pro user, and i do not always use an external keyboard and mouse. the touchpad is easily reached while editing, and without me needing to move my hand too much. so i would consider it a nice feature to switch e.g. between buffers.

                                On 3 Sep 2010, at 16:37, dacresni wrote:

                                > I was about to ask the same thing, isn't its purpose to reduce
                                > interruptions of keyboard use for the mouse. (they say every time you
                                > move your hand from the keyboard to the mouse God kills a hamster)
                                >
                                > On Sep 3, 9:33 am, David Patrick Henderson <dp.chaoswe...@...>
                                > wrote:
                                >> I have to question the use of gesture input in a text editor. What is the purpose and how does it improve user interaction/experience? Other than swiping to change buffers or tabs, there is no seeming natural fit forgesturesthat make sense. So the question is, other than coolness how does this interaction improve the user's experience with vim? I, for one, am not at all certain howgestureswould improve or increase my productivity in vim. Let us not forget the purpose of vim is as an editor of text, so I ask, dogesturesin fact bring an improvement to editing in vim or are they a feature for feature's sake?
                                >>
                                >> Dave Henderson
                                >> --
                                >> "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult."
                                >> -- C. A. R. "Tony" Hoare
                                >
                                > --
                                > You received this message from the "vim_mac" 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

                                --
                                You received this message from the "vim_mac" 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
                              • björn
                                On 3 September 2010 16:33, David Patrick Henderson ... I agree: the rotate/pinch gestures do not make much sense and I am leaning towards deprecating them
                                Message 15 of 18 , Sep 3, 2010
                                  On 3 September 2010 16:33, David Patrick Henderson
                                  <dp.chaoswerks@...> wrote:
                                  > I have to question the use of gesture input in a text editor. What is the purpose and how does it improve user interaction/experience? Other than swiping to change buffers or tabs, there is no seeming natural fit for gestures that make sense. So the question is, other than coolness how does this interaction improve the user's experience with vim? I, for one, am not at all certain how gestures would improve or increase my productivity in vim. Let us not forget the purpose of vim is as an editor of text, so I ask, do gestures in fact bring an improvement to editing in vim or are they a feature for feature's sake?

                                  I agree: the rotate/pinch gestures do not make much sense and I am
                                  leaning towards deprecating them (partly also because they generate
                                  input events continuously as you move your fingers which is not good
                                  for key mappings). I only included these in the patch so that people
                                  could try it out and give me some feedback.

                                  As for the swipe gesture: as soon as there is some kind of hyperlink
                                  system I expect to be able to swipe left/right to go back/forward. I
                                  think this makes for a perfect fit for navigating Vim's help.

                                  Björn

                                  --
                                  You received this message from the "vim_mac" 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.