Open Ram-Z opened 8 years ago
I found two different workarounds for this.
function! TWUnmap(a,b)
unmap <buffer> J
unmap <buffer> K
endfunction
function! TWUnmapChooser()
if has("nvim")
call jobstart(['bash','-c','echo "-"; exit;'],{'on_stdout':'TWUnmap'})
else
call job_start(['bash','-c','echo "-"; exit;'],{'out_cb':'TWUnmap'})
endif
endfunction
augroup TaskwarriorMapping
autocmd!
autocmd FileType taskreport :call TWUnmapChooser()
augroup END
I have
<space>
as my leader key and I can't use it inside taskreport files.Adding an option to prevent any mappings to be set, or checking whether a key is already mapped using
maparg
would be very welcomed.