Sun, 26 Feb 2017 00:25:20 -0500
Get this stuff hidden from tabline
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 |