Monday, September 15, 2014

Editing files on Google Drive

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?

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