Hi sinbad!

On Mo, 08 Mär 2010, sinbad wrote:

> how to print a new line in put command in vim
> 
> :for i in range (1,10)| put =' \n'.i | endfor
> 
> the above doesn't print new line as i expected , even \r didnt' help.

That is because you put it in single quotation marks. Using double 
quotation marks should work, though you have to escape them in your 
statement, since the " is also the start of a comment.

So this should work:
:for i in range (1,10)| put =\" \n\".i | endfor


Using append() might be easier, since you wouldn't not need the for 
loop.

regards,
Christian

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

Reply via email to