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.
 
function! RecordFileOpen()
let record = " (".strftime("%Y/%m/%d %H:%M").") ".expand("%:p")
redir >> C:/vimlog.txt
echo record
redir END
endfunction

autocmd! BufReadPre * exe RecordFileOpen()
                                          

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