""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Some filetype-specific settings
-au FileType text,markdown,mail,tex,gitcommit,mediawiki,vimwiki setlocal spell
-au FileType text,markdown,mail,gitcommit,mediawiki,vimwiki setlocal formatoptions+=n
+au FileType text,markdown,asciidoc,mail,gitcommit,mediawiki,vimwiki,tex setlocal spell
+au FileType text,markdown,asciidoc,mail,gitcommit,mediawiki,vimwiki setlocal formatoptions+=n
au Filetype mail setlocal formatoptions+=o
" Add | for block quotation, such that gq respects it
-au Filetype mail setlocal comments+=n:\|
+au Filetype mail setlocal comments+=n:\|,
+" Add ordered lists via .
+au Filetype asciidoc setlocal comments+=fb:.,
au Filetype go setlocal shiftwidth=8 tabstop=8 noexpandtab
au Filetype tex setlocal shiftwidth=2 tabstop=2
au Filetype c,cpp,objc map <buffer> <S-F11> :FSHere<CR>
au Filetype markdown map <buffer> <F5> :call RunMarkdown()<CR>
+au Filetype asciidoc map <buffer> <F5> :call RunAsciidoc()<CR>
" Start interactive EasyAlign in visual mode (e.g. vipga)
vmap <Enter> <Plug>(EasyAlign)
endfunction
+function RunAsciidoctor()
+ execute ":!asciidoctor " . @%
+endfunction
+
+
function RunMarkdown()
if executable("pandoc")
call RunPandoc()
endfunction
+function RunAsciidoc()
+ if executable("asciidoctor")
+ call RunAsciidoctor()
+ else
+ echo "No asciidoc implementation found."
+ endif
+endfunction
+
+
function OnBattery()
if has('macunix')
return match(system('pmset -g batt'), "Now drawing from 'Battery Power'") != -1