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

Re: :put alternatives?

Expand Messages
  • Benji Fisher
    ... Briefly, any time you can use a register a, you can use ={expr}. HTH --Benji Fisher
    Message 1 of 2 , Jul 2, 2001
    • 0 Attachment
      Alex wrote:
      >
      > Is there any command like :put that will work on a variable instead of a
      > register?
      > I want to do something like:
      > :let g:foo="Some String"
      > :put g:foo
      >
      > but :put only works with registers, and I dont feel like using a register
      > for this purpose.
      > is there anything I can do to insert the text from a global variable into
      > the text I'm editing?

      Use the expression register:

      :put=g:foo

      :help :put
      :help "=

      Briefly, any time you can use a register "a, you can use "={expr}.

      HTH --Benji Fisher
    Your message has been successfully submitted and would be delivered to recipients shortly.