comparison .chezmoitemplates/config.vim @ 648:c5ed13440614

Set and optionally create backup and undo dirs
author zegervdv <zegervdv@me.com>
date Fri, 02 Sep 2022 07:37:49 +0200
parents a2a5862a3bd3
children 0bea9fd463b5
comparison
equal deleted inserted replaced
647:7e98d6e02819 648:c5ed13440614
1 " vim:fdm=marker:ts=2:sw=2 1 " vim:fdm=marker:ts=2:sw=2
2 2
3 let s:darwin = has('mac') 3 let s:darwin = has('mac')
4 let s:windows = has('win32') 4 let s:windows = has('win32')
5 5
6
7 " General Settings and options
8
9 if !s:windows
10 if !isdirectory(expand(&backupdir))
11 call mkdir(expand(&backupdir), "p")
12 endif
13 if !isdirectory(expand(&directory))
14 call mkdir(expand(&directory), "p")
15 endif
16 end
17
18 if v:version >= 703
19 if !isdirectory(expand(&undodir))
20 call mkdir(expand(&undodir), "p")
21 endif
22 endif
23
24 "
25 6
26 " Mappings 7 " Mappings
27 8
28 9
29 10