Friday, September 24, 2010

Re: How to write lines from script with both CR/LF

On Sep 24, 3:46 pm, Reid Thompson <reid.thomp...@ateb.com> wrote:
> On Fri, 2010-09-24 at 16:41 -0400, Roy Fulbright wrote:
> > I have the following function that writes a line to a file every time
> > a document is opened taht shows the date, time, and document name. It
> > uses redir and echo to write the lines, which works just fine.
> > However, the lines are terminated with linefeed only. How can I get it
> > to terminate lines with carriage return and linefeed? As it stands,
> > the lines are all run together when the file is opened in notepad.
> > TIA.
>
> try setting fileformat to dos

If that doesn't work, my next idea would be to include a carriage
return manually like this:

let record = " (".strftime("%Y/%m/%d %H:%M").") ".expand("%:p")."\r"

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

No comments: