.vim/autoload/vimrc.vim

Sat, 25 Feb 2017 03:13:13 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 25 Feb 2017 03:13:13 -0500
changeset 524
d559496f6ef3
parent 470
4c2db769baac
child 574
3874b97048b0
permissions
-rw-r--r--

Drop bufferline for airline builtin


function! vimrc#AutoFmtToggle() abort
  if &formatoptions =~ 'a'
    setl fo-=a
    echo '-a'
  else
    setl fo+=a
    echo '+a'
  endif
endfunction

" Make paths when writing, as necessary
function! vimrc#MkNonExDir(file, buf) abort
  if empty(getbufvar(a:buf, '&buftype')) && a:file!~#'\v^\w+\:\/'
    let dir=fnamemodify(a:file, ':h')
    if !isdirectory(dir)
      call mkdir(dir, 'p')
    endif
  endif
endfunction

mercurial