diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-09 23:38:12 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-09 23:38:12 +1200 |
commit | 5cf80518010e7376427ddfac00a4f35c63bbe84c (patch) | |
tree | c349f329e755b82cdb2b1ddc3613a2a9de1b8830 | |
parent | Restore -nargs=1 for :EnsureDir (diff) | |
download | dotfiles-5cf80518010e7376427ddfac00a4f35c63bbe84c.tar.gz dotfiles-5cf80518010e7376427ddfac00a4f35c63bbe84c.zip |
Document :EnsureDir command as well as function
-rw-r--r-- | vim/vimrc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -148,6 +148,12 @@ function s:EnsureDir(path) abort return isdirectory(path) \ || exists('*mkdir') && mkdir(path, 'p', 0700) endfunction + +" Now we define the :EnsureDir command for user-level access to the +" s:EnsureDir() function. We set the tab completion to provide directory +" names as candidates, and specify that there must be only one argument, which +" we'll provide as a quoted parameter to the function. +" command! -complete=dir -nargs=1 EnsureDir \ call s:EnsureDir(<q-args>) |