vim-jukit icon indicating copy to clipboard operation
vim-jukit copied to clipboard

keymapping has error

Open cyoki opened this issue 1 year ago • 1 comments

I want to remap the keys like below

vim.keymap.set({'n', 'i'}, '<f3>', '<esc><cmd>call jukit#send#section(0)<cr><esc><cmd>call jukit#convert#notebook_convert("jupyter-notebook")<cr>')

but there's error:

Error detected while processing function jukit#send#section[10]..<SNR>63_send_single_section[21]..<SNR>63_send_to_split[14]..<SNR>63_send[20]..jukit#convert#notebook_convert: line 3

but the code seems can run.

Thanks for your time!

cyoki avatar Mar 12 '23 23:03 cyoki

Hi! I tried out your key mapping and it works fine for me. The error suggests that the problem occurs in the third line of jukit#convert#notebook_convert function, when it tries to save the file before converting to a notebook. Did you by chance somehow try the mapping on a readonly file? Does the jukit#convert#notebook_convert function work on its own?

luk400 avatar Apr 02 '23 17:04 luk400