Yasuhiro Matsumoto wrote:

> "a" mode is usefull to append text/binary into the file.
> For example, writing log file. redir isn't work with nesting call. And
> verbosefile contains needless contents. I know :w>>file but it need
> buffer contains text to append. So currently, vim doesn't have a
> seamless way to append text into a file.
> 
> Below is a patch to add "a" mode into writefile().
> 
> https://gist.github.com/mattn/3c7bdb1fa2ace107888f

Thanks, this is useful.

Can you please also update the documentation?

There currently is no test for writefile() at all.  It would be useful
to verify it works, with the binary flag too.  And that a NL in the text
is changed to a NUL in the file.

-- 
MORTICIAN:    Bring out your dead!
              [clang]
              Bring out your dead!
              [clang]
              Bring out your dead!
CUSTOMER:     Here's one -- nine pence.
DEAD PERSON:  I'm not dead!
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui