MDL-64443 git: Excluded vim swap files
authorMatteo Scaramuccia <moodle@matteoscaramuccia.com>
Wed, 19 Dec 2018 09:14:02 +0000 (10:14 +0100)
committerMatteo Scaramuccia <moodle@matteoscaramuccia.com>
Sat, 16 Feb 2019 21:20:05 +0000 (22:20 +0100)
Vim swap filenames are deterministic someway.
Refs:
- http://vimdoc.sourceforge.net/htmldoc/recover.html#swap-file
- https://github.com/vim/vim/blob/4efe73b478d3ba689078da502fd96f45204ff1f5/src/memline.c#L4683
- https://unix.stackexchange.com/a/326737
- https://github.com/github/gitignore/blob/master/Global/Vim.gitignore

.gitignore

index 1dab0f7..b96359f 100644 (file)
@@ -9,10 +9,18 @@
 #
 # See gitignore(5) man page for more details
 #
+
+# Swap files (vim)
+[._]*.s[a-v][a-z]
+[._]*.sw[a-p]
+[._]s[a-rt-v][a-z]
+[._]ss[a-gi-z]
+[._]sw[a-p]
+# Temporary files including undo
+*~
+#
 /config.php
 /lib/editor/tinymce/extra/tools/temp/
-*~
-*.swp
 /tags
 /TAGS
 /cscope.*