From 5cf80518010e7376427ddfac00a4f35c63bbe84c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 9 Jun 2019 23:38:12 +1200 Subject: Document :EnsureDir command as well as function --- vim/vimrc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vim') diff --git a/vim/vimrc b/vim/vimrc index e7622c54..a705c1d4 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -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() -- cgit v1.2.3