aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin/auto_undodir.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-01-17 16:29:23 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-01-17 16:29:23 +1300
commitd59dd741c1edc02543f5669eda866aa177289d6f (patch)
treeaf892a82d6e469e508262db46a974be7e1896a02 /vim/plugin/auto_undodir.vim
parentfead36ba0d10e88660955092026ccaedd2ea7f04 (diff)
downloaddotfiles-d59dd741c1edc02543f5669eda866aa177289d6f.tar.gz
dotfiles-d59dd741c1edc02543f5669eda866aa177289d6f.zip
Refactor directory creation in plugins
No functional changes here, just removing a little duplicate code.
Diffstat (limited to 'vim/plugin/auto_undodir.vim')
-rw-r--r--vim/plugin/auto_undodir.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/vim/plugin/auto_undodir.vim b/vim/plugin/auto_undodir.vim
index 4382fe18..a38dce02 100644
--- a/vim/plugin/auto_undodir.vim
+++ b/vim/plugin/auto_undodir.vim
@@ -37,12 +37,12 @@ if !isdirectory(expand(s:undodir))
" (Fortunately, Unix and Windows are the only OS types in the world)
elseif has('*shellescape')
if has('unix')
- silent! execute '!mkdir -m 0700 -p '
- \ . shellescape(expand(s:undodir))
+ let l:mkdir = '!mkdir -m 0700 -p '
elseif has('win32') || has('win64')
- silent! execute '!mkdir '
- \ . shellescape(expand(s:undodir))
+ let l:mkdir = '!mkdir '
endif
+ silent! execute l:mkdir
+ \ . shellescape(expand(s:undodir))
endif
endif