From 4ff81411383ae372f88caa58a87ee997332c872b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 19 May 2019 16:28:59 +1200 Subject: Add mapping to create path for current file Might also make a BufWritePre hook for this that prompts. --- vim/vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index 136c775a..3df8f97f 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -360,6 +360,9 @@ nmap O (PasteOpenAbove) " \p toggles paste mode nnoremap p :set paste! paste? +" \P creates the path to the current file +nnoremap P :call mkdir(expand('%:h'), 'p') + " \q formats the current paragraph nnoremap q gqap -- cgit v1.2.3