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

Re: put = and newline

Expand Messages
  • KKde
    ... Single quotes treat characters without any special meaning. So you need to use double quotes for interpolation. Working similar alternatives are: for i in
    Message 1 of 4 , Mar 9 5:18 AM
    • 0 Attachment
      > :for i in range (1,10)| put =' \n'.i | endfor
      >
      > the above doesn't print new line as i expected , even \r didnt' help.
      >

      Single quotes treat characters without any special meaning. So you
      need to use double quotes for interpolation.

      Working similar alternatives are:

      for i in range (1,10)| exe 'put = "\n"'.i | endfor

      for i in range (1,10)| put =expand(\"\n\").i | endfor

      Regards,
      Kkde

      --
      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
    Your message has been successfully submitted and would be delivered to recipients shortly.