Saturday, April 7, 2018

BufReadPre event vs file that isn't readable for now: How to mount a volume before reading the file?

Hi!

Let's say, I want to edit a file that is on a volume that is not mounted yet. From the perspective of vim, the file doesn't exist. Whenever I want to edit that file, I have to mount that volume first.

The docs on the BufReadPre event say:

BufReadPre When starting to edit a new buffer, before
reading the file into the buffer. Not used
if the file doesn't exist.

So, I cannot use this event to prepare reading a file that is temporarily unavailable, e.g., because its volume isn't mounted yet.

Is there another event that I can use to mount the volume before reading the file.

Regards,
Tom

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