remove commands that don't exist in idris2

This commit is contained in:
rhiannon morris 2023-05-28 14:43:45 +02:00
parent 518e5f0c41
commit 2c89714506

View file

@ -107,17 +107,6 @@ function! IdrisReload(q)
return tc return tc
endfunction endfunction
function! IdrisReloadToLine(cline)
return IdrisReload(1)
"w
"let file = expand("%:p")
"let tc = s:IdrisCommand(":lto", a:cline, file)
"if (! (tc is ""))
" call IWrite(tc)
"endif
"return tc
endfunction
function! IdrisShowType(imp) function! IdrisShowType(imp)
w w
let word = s:currentQueryObject() let word = s:currentQueryObject()
@ -202,21 +191,6 @@ function! IdrisRefine()
endif endif
endfunction endfunction
function! IdrisAddMissing()
let view = winsaveview()
w
let cline = line(".")
let word = expand("<cword>")
let result = s:IdrisCommand(":am!", cline, word)
if (! (result is ""))
call IWrite(result)
else
e
call winrestview(view)
endif
endfunction
function! IdrisCaseSplit() function! IdrisCaseSplit()
w w
let view = winsaveview() let view = winsaveview()
@ -265,26 +239,19 @@ function! IdrisMakeCase()
endif endif
endfunction endfunction
function! IdrisAddClause(proof) function! IdrisAddClause()
let view = winsaveview() let view = winsaveview()
w w
let cline = line(".") let cline = line(".")
let word = expand("<cword>") let word = expand("<cword>")
if (a:proof==0) let result = s:IdrisCommand(":ac!", cline, word)
let fn = ":ac!"
else
let fn = ":apc!"
endif
let result = s:IdrisCommand(fn, cline, word)
if (! (result is "")) if (! (result is ""))
call IWrite(result) call IWrite(result)
else else
e e
call winrestview(view) call winrestview(view)
call search(word) call search(word)
endif endif
endfunction endfunction
@ -299,11 +266,7 @@ nnoremap <buffer> <silent> <LocalLeader>t :call IdrisShowType(0)<ENTER>
nnoremap <buffer> <silent> <LocalLeader>T :call IdrisShowType(1)<ENTER> nnoremap <buffer> <silent> <LocalLeader>T :call IdrisShowType(1)<ENTER>
nnoremap <buffer> <silent> <LocalLeader>r :call IdrisReload(0)<ENTER> nnoremap <buffer> <silent> <LocalLeader>r :call IdrisReload(0)<ENTER>
nnoremap <buffer> <silent> <LocalLeader>c :call IdrisCaseSplit()<ENTER> nnoremap <buffer> <silent> <LocalLeader>c :call IdrisCaseSplit()<ENTER>
nnoremap <buffer> <silent> <LocalLeader>a 0:call search(":")<ENTER>b:call IdrisAddClause(0)<ENTER>w nnoremap <buffer> <silent> <LocalLeader>a 0:call search(":")<ENTER>b:call IdrisAddClause()<ENTER>w
nnoremap <buffer> <silent> <LocalLeader>d 0:call search(":")<ENTER>b:call IdrisAddClause(0)<ENTER>w
nnoremap <buffer> <silent> <LocalLeader>b 0:call IdrisAddClause(0)<ENTER>
nnoremap <buffer> <silent> <LocalLeader>m :call IdrisAddMissing()<ENTER>
nnoremap <buffer> <silent> <LocalLeader>md 0:call search(":")<ENTER>b:call IdrisAddClause(1)<ENTER>w
nnoremap <buffer> <silent> <LocalLeader>f :call IdrisRefine()<ENTER> nnoremap <buffer> <silent> <LocalLeader>f :call IdrisRefine()<ENTER>
nnoremap <buffer> <silent> <LocalLeader>o :call IdrisProofSearch(0)<ENTER> nnoremap <buffer> <silent> <LocalLeader>o :call IdrisProofSearch(0)<ENTER>
nnoremap <buffer> <silent> <LocalLeader>s :call IdrisProofSearch(0)<ENTER> nnoremap <buffer> <silent> <LocalLeader>s :call IdrisProofSearch(0)<ENTER>