Tuesday, April 2, 2013

Re: Is there an autocmd event that fires after saving the undo file?

On Wednesday, April 3, 2013 12:15:45 AM UTC-5, Ben Fritz wrote:
> I'm trying to write a plugin that will set the 'hidden' attribute in
> Windows for:
> swap files
> undo files
> backup files
> viminfo file
>
> I can update swap files on CursorHold and file write, I can update the
> viminfo file on VimLeave, and the backup file on BufWritePost. But I
> can't figure out how to update the undo file, because when BufWritePost
> fires the undo file has not yet been created (or is locked);
> filewritable() and filereadable() return 0 during this autocmd event.

Sorry for the noise. I had a typo in my vimscript, I was testing filewritable('a:file') instead of filewritable(a:file). This part is working just fine now.

--
--
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/groups/opt_out.

No comments:

Post a Comment