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

How to get the rhs value of a map into the command line?

Expand Messages
  • Vishnu
    Hi vimmers, How to get the rhs value of a map into the command line? ... Doing :map ,a will display the rhs value ( some commands ) of the map (,a). I want
    Message 1 of 3 , Dec 28, 2004
    • 0 Attachment
      Hi vimmers,
      How to get the rhs value of a map into the command line?

      Ex:
      :map ,a "some commands"

      Doing ":map ,a" will display the rhs value ("some commands") of the map
      (,a). I want this result in command line. Is there any way to get the
      rhs value into the command line?

      Thanks,
      ~Vishnu.
    • Antony Scriven
      ... Try =maparg( ,a ) If you are in the process of refining a map then the command-line history (:map ) or command-line window may be more useful.
      Message 2 of 3 , Dec 29, 2004
      • 0 Attachment
        vishnube@... said:

        > Hi vimmers,
        > How to get the rhs value of a map into the command line?
        >
        > Ex:
        > :map ,a "some commands"
        >
        > Doing ":map ,a" will display the rhs value ("some
        > commands") of the map (,a). I want this result in command
        > line. Is there any way to get the rhs value into the
        > command line?

        Try

        <C-R>=maparg(',a')

        If you are in the process of refining a map then the
        command-line history (:map<Up>) or command-line window may
        be more useful.

        Antony
      • Vishnu
        Thank you. It works. ... From: Antony Scriven [mailto:adscriven@fastmail.fm] Sent: Wednesday, December 29, 2004 3:30 PM To: vim users list Subject: Re: How to
        Message 3 of 3 , Dec 29, 2004
        • 0 Attachment
          Thank you. It works.

          -----Original Message-----
          From: Antony Scriven [mailto:adscriven@...]
          Sent: Wednesday, December 29, 2004 3:30 PM
          To: vim users' list
          Subject: Re: How to get the rhs value of a map into the command line?

          vishnube@... said:

          > Hi vimmers,
          > How to get the rhs value of a map into the command line?
          >
          > Ex:
          > :map ,a "some commands"
          >
          > Doing ":map ,a" will display the rhs value ("some
          > commands") of the map (,a). I want this result in command
          > line. Is there any way to get the rhs value into the
          > command line?

          Try

          <C-R>=maparg(',a')

          If you are in the process of refining a map then the
          command-line history (:map<Up>) or command-line window may
          be more useful.

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