Created
May 22, 2011 17:22
-
-
Save frangio/985684 to your computer and use it in GitHub Desktop.
Vim - Don't create swap files for files in the Dropbox folder (useful for folders shared with Windows people)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autocmd BufNewFile,BufRead * | |
\ if expand('%:~') =~ '^\~/Dropbox' | | |
\ set noswapfile | | |
\ else | | |
\ set swapfile | | |
\ endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
swapfile
is local to the buffer, so I don't think re-enabling it is necessary. I am using this for now: