on master help sign in
Add vim shortcut for evaluation
6b1ed5aEdwin Brady
contribs/idriscasesplit.vim+12
@@ -78,9 +78,21 @@ function IdrisAddClause()
78 endif
78 endif
79endfunction
79endfunction
80
80
81+function IdrisEval()
82+ let tc = IdrisReload()
83+ if (tc is "")
84+ let expr = input ("Expression: ")
85+ let fn = "idris --client '" . expr . "'"
86+ let result = system(fn)
87+ echo result
88+ endif
89+ echo ""
90+endfunction
91+
81map ct :call IdrisShowType()<ENTER>
92map ct :call IdrisShowType()<ENTER>
82map cr :call IdrisReload()<ENTER>
93map cr :call IdrisReload()<ENTER>
83map ci :call IdrisCaseSplit()<ENTER>
94map ci :call IdrisCaseSplit()<ENTER>
84map cd ?:<ENTER>b:call IdrisAddClause()<ENTER>w
95map cd ?:<ENTER>b:call IdrisAddClause()<ENTER>w
85map cm 0:call IdrisMakeWith()<ENTER>
96map cm 0:call IdrisMakeWith()<ENTER>
97+map ce :call IdrisEval()<ENTER>
86
98