On Jul 20, 10:14 am, [email protected] wrote:
> when vim is used as part of a pipe on Unix/Linux (console-vim)
> like
>     ls -l * | vim -
> the resulting textbuffer is marked as changed.
You can change this with,
au StdinReadPost * :set nomodified
in your vimrc..

> Reading a file from another "filedescriptor" (and stdin is a
> "filedescriptor",too) like
>     vim file.txt
> and doing a
>     :q
> afterwards will end vim without warning.
>
> I want to make this behaviour more consistant/logical to me, so
> only _texual changes_ to what is read from stdin into vim should
> have the "No write since last change"-response when trying to leave
> vim with
>     :q
The situation here is quite different. In case of $ vim file.txt, the
contents of the file are saved on the disk - no so for stdin.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to