Skip to content

Commit

Permalink
fix: more robust vim-slime cell delimiter detection
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbuhr committed May 1, 2023
1 parent 389a1ea commit fa7f21c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ftplugin/bash.lua
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
vim.b.slime_cell_delimiter = "#%%"
vim.b.slime_cell_delimiter = "#\\s\\=%%"

3 changes: 2 additions & 1 deletion ftplugin/python.lua
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
vim.b.slime_cell_delimiter = "#%%"
vim.b.slime_cell_delimiter = "#\\s\\=%%"

3 changes: 2 additions & 1 deletion ftplugin/sh.lua
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
vim.b.slime_cell_delimiter = "#%%"
vim.b.slime_cell_delimiter = "#\\s\\=%%"

4 changes: 2 additions & 2 deletions lua/config/keymap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ wk.register({
['gN'] = { 'Nzzzv', 'center search' },
['gl'] = { '<c-]>', 'open help link' },
['gf'] = { ':e <cfile><CR>', 'edit file' },
['coo'] = { 'o#%%<cr>', 'new code chunk below' },
['cOo'] = { 'O#%%<cr>', 'new code chunk above' },
['coo'] = { 'o# %%<cr>', 'new code chunk below' },
['cOo'] = { 'O# %%<cr>', 'new code chunk above' },
['cob'] = { 'o```{bash}<cr>```<esc>O', "bash code chunk" },
['cor'] = { 'o```{r}<cr>```<esc>O', "r code chunk" },
['cop'] = { 'o```{python}<cr>```<esc>O', "python code chunk" },
Expand Down

0 comments on commit fa7f21c

Please sign in to comment.