Monday, September 15, 2014

Re: Editing files on Google Drive

Benjamin Fritz wrote:

> I recently started using Google Drive more extensively at work, and was
> happy to be able to edit some text files at home, hoping to see them at
> work later.
>
> But when my work computer synced, it actually got a new copy of the file
> for every time I saved in Vim, probably due to 'backupcopy' creating a new
> file and renaming it rather than overwriting the old file:
> https://productforums.google.com/d/msg/drive/Yjmkd4nbhw4/WOhRazY3gc8J
>
> I THOUGHT I could set 'backupcopy' in a BufRead/BufNewFile autocmd based on
> the location of the file I'm editing; but actually it looks like it's a
> global option. I want to get the benefits of "auto"/"no" documented in
> :help 'backupcopy' but I want to make sure my Google Drive docs get
> overwritten instead of copied to work around Google being careless with
> sync. Is there an easy way to do this? Maybe using BufEnter or BufWritePre?
> Will I risk bad side effects if I do that?

The 'backupcopy' option should be global-local. Perhaps someone can
make a patch for that?

Can the directory tree that is under Google Drive be recognized in some
way? The we could make the "auto" value do the right thing.

--
hundred-and-one symptoms of being an internet addict:
137. You decide to stay in college for an additional year or two,
just so you can have the free Internet access.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

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