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

Re: [Feature Request] Vim should respond to WM_PASTE

Expand Messages
  • A.J.Mechelynck
    ... Doesn t it already? Which actions do you perform to trigger that message? AFAIK, dragging with the mouse, or clicking Edit = Paste, both trigger an action
    Message 1 of 6 , Dec 19, 2006
      Nikolai Weibull wrote:
      > It seems GVim doesn't respond to the WM_PASTE message on Windows. It
      > would be really sweet if it did. I sadly have no intention of
      > implementing this myself, but would appreciate it if this could be
      > added to the TODO.
      >
      > Thanks.
      >
      > nikolai
      >

      Doesn't it already? Which actions do you perform to trigger that message?
      AFAIK, dragging with the mouse, or clicking Edit => Paste, both trigger an
      action in (g)vim. As for Ctrl-V, that is distinct from the Windows Paste
      operation (in Vim it is a "literalize" prefix in Insert monde or a "Blockwise
      visual" command in Normal mode) but you can map it (not recommended) by
      sourcing mswin.vim.


      Best regards,
      Tony.
    • Nikolai Weibull
      ... No; that s why I m posting this feature request. ... PostMessage [1] ... Yes, but as you may know, menus are much like mappings, and this particular one
      Message 2 of 6 , Dec 19, 2006
        On 12/19/06, A.J.Mechelynck <antoine.mechelynck@...> wrote:

        > Nikolai Weibull wrote:

        > > It seems GVim doesn't respond to the WM_PASTE message on Windows. It
        > > would be really sweet if it did. I sadly have no intention of
        > > implementing this myself, but would appreciate it if this could be
        > > added to the TODO.

        > Doesn't it already?

        No; that's why I'm posting this feature request.

        > Which actions do you perform to trigger that message?

        PostMessage [1]

        > AFAIK, dragging with the mouse, or clicking Edit => Paste, both trigger an
        > action in (g)vim.

        Yes, but as you may know, menus are much like mappings, and this
        particular one executes "+gP in normal mode.

        nikolai

        [1] http://www.google.com/search?q=PostMessage
      • A.J.Mechelynck
        ... Try using the client-server feature instead. See ... in the source directory tree. Best regards, Tony.
        Message 3 of 6 , Dec 19, 2006
          Nikolai Weibull wrote:
          > On 12/19/06, A.J.Mechelynck <antoine.mechelynck@...> wrote:
          >
          >> Nikolai Weibull wrote:
          >
          >> > It seems GVim doesn't respond to the WM_PASTE message on Windows. It
          >> > would be really sweet if it did. I sadly have no intention of
          >> > implementing this myself, but would appreciate it if this could be
          >> > added to the TODO.
          >
          >> Doesn't it already?
          >
          > No; that's why I'm posting this feature request.
          >
          >> Which actions do you perform to trigger that message?
          >
          > PostMessage [1]
          >
          >> AFAIK, dragging with the mouse, or clicking Edit => Paste, both
          >> trigger an
          >> action in (g)vim.
          >
          > Yes, but as you may know, menus are much like mappings, and this
          > particular one executes "+gP in normal mode.
          >
          > nikolai
          >
          > [1] http://www.google.com/search?q=PostMessage
          >

          Try using the client-server feature instead.

          See
          :help remote.txt
          :vimgrep /\<FEAT_CLIENTSERVER\>/g src/*.[ch]

          in the source directory tree.


          Best regards,
          Tony.
        • Nikolai Weibull
          ... I don t see how that would solve anything. I don t want to send a Vim-specific message. I want to send a Microsoft Windows -specific message, the reason
          Message 4 of 6 , Dec 20, 2006
            On 12/19/06, A.J.Mechelynck <antoine.mechelynck@...> wrote:

            > Nikolai Weibull wrote:

            > > On 12/19/06, A.J.Mechelynck <antoine.mechelynck@...> wrote:

            > > > Nikolai Weibull wrote:

            > > > > It seems GVim doesn't respond to the WM_PASTE message on Windows. It
            > > > > would be really sweet if it did. I sadly have no intention of
            > > > > implementing this myself, but would appreciate it if this could be
            > > > > added to the TODO.

            > Try using the client-server feature instead.
            >
            > See
            > :help remote.txt
            > :vimgrep /\<FEAT_CLIENTSERVER\>/g src/*.[ch]

            I don't see how that would solve anything. I don't want to send a
            Vim-specific message. I want to send a "Microsoft Windows"-specific
            message, the reason being that I don't want to have to treat Vim
            separately in the "application" I'm writing.

            nikolai
          • Bram Moolenaar
            ... Who would send a WM_PASTE message to Vim? -- An alien life briefly visits earth. Just before departing it leaves a message in the dust on the back of a
            Message 5 of 6 , Jan 7, 2007
              Nikolai Weibull wrote:

              > It seems GVim doesn't respond to the WM_PASTE message on Windows. It
              > would be really sweet if it did. I sadly have no intention of
              > implementing this myself, but would appreciate it if this could be
              > added to the TODO.

              Who would send a WM_PASTE message to Vim?

              --
              An alien life briefly visits earth. Just before departing it leaves a
              message in the dust on the back of a white van. The world is shocked
              and wants to know what it means. After months of studies the worlds
              best linguistic scientists are able to decipher the message: "Wash me!".

              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              \\\ download, build and distribute -- http://www.A-A-P.org ///
              \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
            • Nikolai Weibull
              ... I would. I have a Autohotkey script that emulates Vim s digraph support so that I can type ^K 6 to get a LEFT SINGLE QUOTATION MARK. Sadly, the best way
              Message 6 of 6 , Jan 7, 2007
                On 1/7/07, Bram Moolenaar <Bram@...> wrote:
                >
                > Nikolai Weibull wrote:
                >
                > > It seems GVim doesn't respond to the WM_PASTE message on Windows. It
                > > would be really sweet if it did. I sadly have no intention of
                > > implementing this myself, but would appreciate it if this could be
                > > added to the TODO.
                >
                > Who would send a WM_PASTE message to Vim?

                I would. I have a Autohotkey script that emulates Vim's digraph
                support so that I can type ^K'6 to get a LEFT SINGLE QUOTATION MARK.
                Sadly, the best way to send Unicode characters to Windows applications
                through a Autohotkey script is through the use of the clipboard (might
                not work otherwise). Thus, the character is stored in the clipboard
                and then a PostMessage of WM_PASTE is sent to the active application.
                However, if the application doesn't respond to WM_PASTE, this won't
                work.

                (I'll gladly post the script if anyone wants it, by they way.)

                nikolai
              Your message has been successfully submitted and would be delivered to recipients shortly.