Mon, 01 May 2017 13:20:47 -0400
Make a stripped-down html5 mail template
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 |