projects
/
vimconf.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
init: Set high foldlevelstart
[vimconf.git]
/
macros.vim
diff --git
a/macros.vim
b/macros.vim
index 58599670c737d4e4f01f920551b31a873f571155..b0c94ddefdd6a4057ee88caf5bb2bd0b8fbfb884 100644
(file)
--- a/
macros.vim
+++ b/
macros.vim
@@
-102,6
+102,11
@@
function RunMarkdownpy(prog)
endfunction
endfunction
+function RunAsciidoctor()
+ execute ":!asciidoctor " . @%
+endfunction
+
+
function RunMarkdown()
if executable("pandoc")
call RunPandoc()
function RunMarkdown()
if executable("pandoc")
call RunPandoc()
@@
-115,11
+120,22
@@
function RunMarkdown()
endfunction
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
elseif has('unix')
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']
+ if filereadable('/sys/class/power_supply/AC/online')
+ return readfile('/sys/class/power_supply/AC/online') == ['0']
+ endif
endif
return 0
endfunction
endif
return 0
endfunction