2024-02-22 11:32:07 +00:00
|
|
|
local opts = { noremap = true, silent = true, buffer = true }
|
2024-03-03 16:58:37 +00:00
|
|
|
--Convert between py and ipynb
|
|
|
|
vim.keymap.set('n', '<leader>jnp', '<cmd>call jukit#convert#notebook_convert()<CR>', opts)
|
2024-02-12 15:05:56 +00:00
|
|
|
-- Create new code cell below. Argument: Whether to create code cell (0) or markdown cell (1)
|
2024-02-22 11:32:07 +00:00
|
|
|
vim.keymap.set('n', '<leader>jco', '<cmd>call jukit#cells#create_below(0)<CR>', opts)
|
2024-02-12 15:05:56 +00:00
|
|
|
-- Create new code cell above. Argument: Whether to create code cell (0) or markdown cell (1)
|
2024-02-22 11:32:07 +00:00
|
|
|
vim.keymap.set('n', '<leader>jcO', '<cmd>call jukit#cells#create_above(0)<CR>', opts)
|
2024-02-12 15:05:56 +00:00
|
|
|
|
|
|
|
-- Create new text (markdown) cell below. Argument: Whether to create code cell (0) or markdown cell (1)
|
2024-02-22 11:32:07 +00:00
|
|
|
vim.keymap.set('n', '<leader>jct', '<cmd>call jukit#cells#create_below(1)<CR>', opts)
|
2024-02-12 15:05:56 +00:00
|
|
|
-- Create new text (markdown) cell above. Argument: Whether to create code cell (0) or markdown cell (1)
|
2024-02-22 11:32:07 +00:00
|
|
|
vim.keymap.set('n', '<leader>jcT', '<cmd>call jukit#cells#create_above(1)<CR>', opts)
|
2024-02-12 15:05:56 +00:00
|
|
|
|
|
|
|
-- Deletes the current cell
|
2024-02-22 11:32:07 +00:00
|
|
|
vim.keymap.set('n', '<leader>jcd', '<cmd>call jukit#cells#delete()<CR>', opts)
|
2024-02-12 15:05:56 +00:00
|
|
|
|
|
|
|
-- Send current section (argument: 0 indicates the current section)
|
2024-02-22 11:32:07 +00:00
|
|
|
vim.keymap.set('n', '<leader>jcc', '<cmd>call jukit#send#section(0)<CR>', opts)
|
2024-02-12 15:05:56 +00:00
|
|
|
|
|
|
|
-- Send all sections up to the current section
|
2024-02-22 11:32:07 +00:00
|
|
|
vim.keymap.set('n', '<leader>jcac', '<cmd>call jukit#send#until_current_section()<CR>', opts)
|
2024-02-12 15:05:56 +00:00
|
|
|
|
|
|
|
-- Send all sections
|
2024-02-22 11:32:07 +00:00
|
|
|
vim.keymap.set('n', '<leader>jca', '<cmd>call jukit#send#all()<CR>', opts)
|
2024-02-12 15:05:56 +00:00
|
|
|
|
|
|
|
-- Open an output split
|
2024-02-22 11:32:07 +00:00
|
|
|
vim.keymap.set('n', '<leader>jos', '<cmd>call jukit#splits#output()<CR>', opts)
|