Saturday, July 12, 2014

Re: undo doesn't fully undo -- won't restore original file.

On Sa, 12 Jul 2014, Linda A. Walsh wrote:

> I edited a file to test with an app that, oddly, didn't have an "eol" at the
> end of the last file line.
>
> My edit didn't work so I pressed "u" to undo and rewrote the original file.
>
> But now it wasn't. It had an extra character at the end of the file (which
> the app took as file corruption).
>
> How can I get vim not to force an "eol" onto a file that didn't
> originally have one?
>
> (Ideally, I'd like it to preserve state... not add them to files
> that don't have them and not delete them from those that do).

:h 'binary'
:h 'eol'

http://vim.wikia.com/wiki/Preserve_missing_end-of-line_at_end_of_text_files
http://www.vim.org/scripts/script.php?script_id=4550

Best,
Christian
--

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

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

No comments: