Re: todo? (setting eol/noeol after :r !cmd ? )

2007-02-28 Thread Bram Moolenaar

Yakov Lerner wrote:

> Maybe vim would better set &eol/&noel after ':r !cmd' also,
> no only after reading the file into buffer ? (that is, the condition
> whether input had final \n or not).
> As I can see currently, this piece of info is lost after ': !cmd' ?

It completely depends on what you are doing.  If you have 'binary' set
and do ":r !cmd" on the last line, then you actually insert a line break
already, no matter if 'endofline' is set or not.  And whether the value
of 'endofline' should be adjusted to the output of "cmd" again depends
on what you are doing.  If you are concatenating binary files it does
make sense to adjust 'endofline'.  But you still need to fix that line
break if 'endofline' wasn't set before.

Perhaps it's a lot simpler if we just leave it to the user.  It's a very
uncommon issue anyway.

-- 
hundred-and-one symptoms of being an internet addict:
229. You spend so much time thinking what to add on this list.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: todo? (setting eol/noeol after :r !cmd ? )

2007-02-28 Thread A.J.Mechelynck

Yakov Lerner wrote:

Hello Bram,

Maybe vim would better set &eol/&noel after ':r !cmd' also,
no only after reading the file into buffer ? (that is, the condition
whether input had final \n or not).
As I can see currently, this piece of info is lost after ': !cmd' ?

Yakov



Maybe after :$r !cmd (appending at end-of-file), but not in other cases since 
the last line of the file isn't touched.


Best regards,
Tony.
--
Hard work may not kill you, but why take chances?


todo? (setting eol/noeol after :r !cmd ? )

2007-02-28 Thread Yakov Lerner

Hello Bram,

Maybe vim would better set &eol/&noel after ':r !cmd' also,
no only after reading the file into buffer ? (that is, the condition
whether input had final \n or not).
As I can see currently, this piece of info is lost after ': !cmd' ?

Yakov