syntax on
+" Load some macros
+runtime macros.vim
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Some global plugin settings
let g:neomake_c_enabled_makers = ['clangtidy', 'clangcheck']
let g:neomake_cpp_enabled_makers = ['clangtidy', 'clangcheck']
-call neomake#configure#automake('w')
-"let g:neomake_logfile = '/tmp/neomake.log'
+" Taken from neomake
+if OnBattery()
+ call neomake#configure#automake('w')
+else
+ call neomake#configure#automake('nw', 1000)
+endif
+
let g:clang_compilation_database = '.'
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-runtime macros.vim
runtime keymaps.vim
if filereadable($HOME . '/.vim/init-local.vim')
execute ":!pandoc " . cssopts . " --self-contained --toc '" . @% . "' -o '" . @% . "'.html"
endfunction
+
function RunMarkdownpy(prog)
execute ":!" . a:prog . " " . @% . " > " . @% . ".html"
endfunction
+
function RunMarkdown()
if executable("pandoc")
call RunPandoc()
endfunction
+function OnBattery()
+ if has('macunix')
+ return match(system('pmset -g batt'), "Now drawing from 'Battery Power'") != -1
+ elseif has('unix')
+ return readfile('/sys/class/power_supply/AC/online') == ['0']
+ endif
+ return 0
+endfunction
+
+
if filereadable($HOME . '/.vim/macros-local.vim')
source ~/.vim/macros-local.vim
endif