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

what is the way to find out if a certain text object is already defined?

Expand Messages
  • jmlucjav
    ​ hi I am considering adding some mapping to define a new text object (for numbers) as iN, aN etc. The thing is I already have a number of plugins for text
    Message 1 of 4 , Aug 3, 2014
    • 0 Attachment
      hi

      I am considering adding some mapping to define a new text object (for numbers) as iN, aN etc. The thing is I already have a number of plugins for text objects. I don't have my custom cheatsheat here, so I cannot verify iN is available.

      What would be the way to list all text objects defined from inside vim, or at least check iN is available?

      thanks

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

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/d/optout.
    • Tony Mechelynck
      ... No need for a custom external cheat sheet, there is the built-in help. ... send back to :in[sert] and :an[oremenu] so these two moves are not yet defined
      Message 2 of 4 , Aug 3, 2014
      • 0 Attachment
        On 03/08/14 10:52, jmlucjav wrote:
        > ​
        > hi
        >
        > I am considering adding some mapping to define a new text object (for
        > numbers) as iN, aN etc. The thing is I already have a number of plugins
        > for text objects. I don't have my custom cheatsheat here, so I cannot
        > verify iN is available.
        >
        > What would be the way to list all text objects defined from inside vim,
        > or at least check iN is available?
        >
        > thanks
        >

        No need for a custom external cheat sheet, there is the built-in help.
        :help iN
        :help aN
        send back to :in[sert] and :an[oremenu] so these two "moves" are not yet
        defined in Normal or Operator-pending mode. Similarly there is no help
        for v_iN or v_aN so they aren't taken (yet) in Visual mode either.

        Near the top of
        :help quickref.txt
        you can see a two-column list with among others
        |Q_tm| motion: Text object
        |Q_to| Text objects
        so double-clicking either of these green helptags (or hitting Ctrl-] on
        them) will bring you to the corresponding help. Or you could use just
        :help Q_tm
        :help Q_to
        for the same purpose. That's a built-in cheat sheet for you.


        Best regards,
        Tony.
        --
        Whatever it is, I fear Greeks even when they bring gifts.
        -- Publius Vergilius Maro (Virgil)


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

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/d/optout.
      • jmlucjav
        I think I was misunderstood... What I mean is: I have already installed a bunch of plugins that provide new text objects. I have a custom cheat sheet with
        Message 3 of 4 , Aug 3, 2014
        • 0 Attachment
          I think I was misunderstood...

          What I mean is: I have already installed a bunch of plugins that provide new text objects. I have a 'custom cheat sheet' with all those text objects, but I dont have it with me now. 

          I need a way to find you if a text object (not a native one!) is alreadly defined (by a plugin or in my vimrc for instance). Is there such a way?




          On Sun, Aug 3, 2014 at 2:16 PM, Tony Mechelynck <antoine.mechelynck@...> wrote:
          On 03/08/14 10:52, jmlucjav wrote:

          hi

          I am considering adding some mapping to define a new text object (for
          numbers) as iN, aN etc. The thing is I already have a number of plugins
          for text objects. I don't have my custom cheatsheat here, so I cannot
          verify iN is available.

          What would be the way to list all text objects defined from inside vim,
          or at least check iN is available?

          thanks


          No need for a custom external cheat sheet, there is the built-in help.
                  :help iN
                  :help aN
          send back to :in[sert] and :an[oremenu] so these two "moves" are not yet defined in Normal or Operator-pending mode. Similarly there is no help for v_iN or v_aN so they aren't taken (yet) in Visual mode either.

          Near the top of
                  :help quickref.txt
          you can see a two-column list with among others
                  |Q_tm|  motion: Text object
                  |Q_to|  Text objects
          so double-clicking either of these green helptags (or hitting Ctrl-] on them) will bring you to the corresponding help. Or you could use just
                  :help Q_tm
                  :help Q_to
          for the same purpose. That's a built-in cheat sheet for you.


          Best regards,
          Tony.
          --
          Whatever it is, I fear Greeks even when they bring gifts.
                          -- Publius Vergilius Maro (Virgil)


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

          --- You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/d/optout.

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

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/d/optout.
        • Павлов Николай Алекса
          ... Hash: SHA512 ... Depending on whether you need to find this automatically (from plugin) or not use maparg() or :omap. Just :omap will print all mappings,
          Message 4 of 4 , Aug 3, 2014
          • 0 Attachment
            -----BEGIN PGP SIGNED MESSAGE-----
            Hash: SHA512

            On August 3, 2014 4:58:43 PM GMT+03:00, jmlucjav <jmlucjav@...> wrote:
            >I think I was misunderstood...
            >
            >What I mean is: I have already installed a bunch of plugins that
            >provide
            >new text objects. I have a 'custom cheat sheet' with all those text
            >objects, but I dont have it with me now.
            >
            >I need a way to find you if a text object (not a native one!) is
            >alreadly
            >defined (by a plugin or in my vimrc for instance). Is there such a way?
            >
            >
            >
            >
            >On Sun, Aug 3, 2014 at 2:16 PM, Tony Mechelynck <
            >antoine.mechelynck@...> wrote:
            >
            >> On 03/08/14 10:52, jmlucjav wrote:
            >>
            >>>
            >>> hi
            >>>
            >>> I am considering adding some mapping to define a new text object
            >(for
            >>> numbers) as iN, aN etc. The thing is I already have a number of
            >plugins
            >>> for text objects. I don't have my custom cheatsheat here, so I
            >cannot
            >>> verify iN is available.
            >>>
            >>> What would be the way to list all text objects defined from inside
            >vim,
            >>> or at least check iN is available?
            >>>
            >>> thanks
            >>>
            >>>
            >> No need for a custom external cheat sheet, there is the built-in
            >help.
            >> :help iN
            >> :help aN
            >> send back to :in[sert] and :an[oremenu] so these two "moves" are not
            >yet
            >> defined in Normal or Operator-pending mode. Similarly there is no
            >help for
            >> v_iN or v_aN so they aren't taken (yet) in Visual mode either.
            >>
            >> Near the top of
            >> :help quickref.txt
            >> you can see a two-column list with among others
            >> |Q_tm| motion: Text object
            >> |Q_to| Text objects
            >> so double-clicking either of these green helptags (or hitting Ctrl-]
            >on
            >> them) will bring you to the corresponding help. Or you could use just
            >> :help Q_tm
            >> :help Q_to
            >> for the same purpose. That's a built-in cheat sheet for you.
            >>
            >>
            >> Best regards,
            >> Tony.
            >> --
            >> Whatever it is, I fear Greeks even when they bring gifts.
            >> -- Publius Vergilius Maro (Virgil)
            >>
            >>
            >> --
            >> --
            >> 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
            >>
            >> --- You received this message because you are subscribed to the
            >Google
            >> Groups "vim_use" group.
            >> To unsubscribe from this group and stop receiving emails from it,
            >send an
            >> email to vim_use+unsubscribe@....
            >> For more options, visit https://groups.google.com/d/optout.
            >>
            >
            >--
            >--
            >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
            >
            >---
            >You received this message because you are subscribed to the Google
            >Groups "vim_use" group.
            >To unsubscribe from this group and stop receiving emails from it, send
            >an email to vim_use+unsubscribe@....
            >For more options, visit https://groups.google.com/d/optout.

            Depending on whether you need to find this automatically (from plugin) or not use maparg() or :omap. Just :omap will print all mappings, :omap with one argument will print all mappings starting with that argument.

            Note: neither will find all possibly defined filetype-specific mappings. If mapping existence depend on some condition it cannot be found without understanding plugin source code.
            -----BEGIN PGP SIGNATURE-----
            Version: APG v1.1.1

            iQI1BAEBCgAfBQJT3ji7GBxaeVggPHp5eC52aW1AZ21haWwuY29tPgAKCRCf3UKj
            HhHSvtqID/4x88UN1u6AZhdbGMedwQRURqkTZTClIXDe2zcT8x8GWjo5htnMLgGO
            oIbgR2Z7dzT3fBqE3I75B75dJG8PMyByQcJxeQVPS0gkno2Z4i9r4J9lj/enyqJ0
            LyeztZ8PzHErSfaqGA9CzhkrnsZu6IgcfoUnNXPekJlYDv5MVCfzV/AWA2OKbhUy
            wl7rILb3asPZuizx6B7TNR1AF4PWYpzMuRDPebcCKaAhDTKXaq950CP6Vn0BJJH+
            jpuNTtvw7Togk8oGL7WbKMJB9BhyBsrD/PYUNz1lApBuqM9VGUZlICsIjV11TV5b
            WgXdc52NhCbcN221bJTVkVSs0Xg9trQkDhP1y8z8SXsBhlHnQ6ZqfeBFF4ZhrGGv
            FjmA+EpSX5DwsxwAwpgPo09IRnsmpJtQF1lB2+0uYO8p7ab9wxMgGSbDxiFsgKn6
            GkA/fkZt/Nc3a3xdGLhaA5aPegmuyyk6Ya4xtVk+k1x7i0xw+RDlfX0sOZdimg+U
            Mrk+nxyeweyS+Kz3wscGNrZTa24SSEEoc8PHsZRkGz7148XdaiuHgC0ipqVKFb9N
            QZgZCGueNxUwvTZElkwnkX3DeMbIdUDNKNEgh4MG7m8EyZiUhEuJkMT8kLp4A+ko
            C19CC+nkMGVlp6FUPorm39hvmBSzJ/zWyyzUSb2rky6tEl6VAiLB5Q==
            =RrhS
            -----END PGP SIGNATURE-----

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

            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/d/optout.
          Your message has been successfully submitted and would be delivered to recipients shortly.