Thu, 27 Apr 2017 12:40:35 -0400
Make sure git sticks to gpg2
470 | 1 | |
2 | function! vimrc#AutoFmtToggle() abort | |
3 | if &formatoptions =~ 'a' | |
4 | setl fo-=a | |
5 | echo '-a' | |
6 | else | |
7 | setl fo+=a | |
8 | echo '+a' | |
9 | endif | |
10 | endfunction | |
11 | ||
12 | " Make paths when writing, as necessary | |
13 | function! vimrc#MkNonExDir(file, buf) abort | |
14 | if empty(getbufvar(a:buf, '&buftype')) && a:file!~#'\v^\w+\:\/' | |
15 | let dir=fnamemodify(a:file, ':h') | |
16 | if !isdirectory(dir) | |
17 | call mkdir(dir, 'p') | |
18 | endif | |
19 | endif | |
20 | endfunction | |
21 |