aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-08 20:36:49 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-08 20:36:49 +1200
commit69dbdc47735e4a9b8e9ac686aafbaefdc1cab9e6 (patch)
treed618e7bcd124b78de83a3bccf3acf0f62424730b
parentSort 'backupskip' patterns before reversing (diff)
downloaddotfiles-69dbdc47735e4a9b8e9ac686aafbaefdc1cab9e6.tar.gz
dotfiles-69dbdc47735e4a9b8e9ac686aafbaefdc1cab9e6.zip
Explain sort-reverse of 'backupskip' patterns
-rw-r--r--vim/vimrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 0675a9d8..74f336b7 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -136,6 +136,9 @@ if has('unix')
" This might be a bug in Vim. To work around this, we attempt to remove
" each pattern before we add it.
"
+ " We sort and add them backwards only so that they're in alphabetical order
+ " in the final option!
+ "
for s:pattern in reverse(sort(s:backupskip_patterns))
execute 'set backupskip-='.vimrc#EscapeSetPart(s:pattern)
execute 'set backupskip^='.vimrc#EscapeSetPart(s:pattern)