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

need to write a register content to a file

Expand Messages
  • Xiangjiang Ma
    Hi, Any quick way to write a register content to a file? Currently, I have to go through (eg for @a) o a :., ]w myfile_for_register_a Thanks. --
    Message 1 of 2 , Feb 1, 2002
    • 0 Attachment
      Hi,

      Any quick way to write a register content to a file?

      Currently, I have to go through (eg for @a)

      o<C-R>a<Esc>:.,']w myfile_for_register_a<CR>

      Thanks.


      --
      Xiangjiang Ma
      maxiangjiang@...


      _________________________________________________________________
      MSN Photos is the easiest way to share and print your photos:
      http://photos.msn.com/support/worldwide.aspx
    • Thomas S. Urban
      ... I don t know if it s quicker, but you could use ... -- You will be Told about it Tomorrow. Go Home and Prepare Thyself.
      Message 2 of 2 , Feb 1, 2002
      • 0 Attachment
        On Fri, Feb 01, 2002 at 09:20:29AM -0800, Xiangjiang Ma wrote:
        >
        > Hi,
        >
        > Any quick way to write a register content to a file?
        >
        > Currently, I have to go through (eg for @a)
        >
        > o<C-R>a<Esc>:.,']w myfile_for_register_a<CR>


        I don't know if it's quicker, but you could use
        :redir >> file
        :echo @a
        :redir END

        in a mapping:

        :map <whatever> :redir! > FILE<CR>:echo @a<CR>:redir END<CR><CR>


        --
        You will be Told about it Tomorrow. Go Home and Prepare Thyself.
      Your message has been successfully submitted and would be delivered to recipients shortly.