Sunday, September 6, 2015

Re: au! FileChangedShell

On Friday, September 4, 2015 at 11:50:56 AM UTC-7, porphyry5 wrote:
> I put this command in ~/.vimrc.
> au! FileChangedShell img.dat r img.dat
> which also contains
> set autochdir " pwd is always directory of current buffer
>
> I hoped to ensure that, if the file img.dat exists in pwd and
> it is modified by some app other than vim, then vim would read
> the new img.dat into the current buffer. It does not, nothing
> happens.
>
> v:fcs_reason is unset
> :if exists("#FileChangedShell") | echo 'yes' | else | echo 'no' | endif
> returns 'yes'
>
> What am I missing?
>
> --
>
> Graham Lawrence

Thank you both, Marco and Ben Fritz, for your info. I had interpreted FileChangedShell to mean that if I had a buffer for img.dat in vim, I could automatically read its update into another buffer exactly where I want the new data to end up. In other words, completely effortless on my part.

The img.dat buffer is duly updated, but the r command to read it into the active buffer does not operate. Can it be done?

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

Post a Comment