Saturday, November 23, 2019

Re: How to use "tail -f" in Vim's 8.1 :terminal command window?

On 11/23/19 10:12 AM, Matteo Landi wrote:
> Did you try the same, tail - f, but from outside vim?
>
> If not wrong, vim is dumping the whole buffer to the file on save
(not 'appending' new content) so I wouldn't be surprised it tail - f did
not work because of it.
>

And I think by default vim renames the current file then writes to a
completely new file, so the file you're tailing never changes, in fact
it gets deleted. You can modify that behavior with various options
(backup, writebackup, backupcopy). I got tail -f to show something by
setting nobackup (which is the default) and nowritebackup (which isn't),
then modifying a file I was tailing. Because of the way tail works, this
would only do something useful if you're just adding lines to the file,
but it does work.

Brian

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/0a0e1b32-e46b-43ba-8730-cbc3a39eeed6%40gmail.com.

No comments:

Post a Comment