From fc10dee99aa9c0b88c0515672a381f6d15e6428d Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Tue, 27 Sep 2022 23:30:20 -0600 Subject: [PATCH] Re-enable julia REPL --- vim/.vim/ftplugin/julia.vim | 16 +++++++++++++++- vim/.vim/init_scripts/external_plugins.vim | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/vim/.vim/ftplugin/julia.vim b/vim/.vim/ftplugin/julia.vim index 7d0d5a5..7d27a19 100644 --- a/vim/.vim/ftplugin/julia.vim +++ b/vim/.vim/ftplugin/julia.vim @@ -2,8 +2,22 @@ iabbrev #! #!/usr/bin/env julia iabbrev initmodeline # vim: set ft=julia ff=unix: -" Set REPL commands ==== +" IPython cell =========================================== +" Enables iPython Cell to copy commands into a julia REPL via tmux +let g:ipython_cell_delimit_cells_by = 'tags' +let g:ipython_cell_tag = ['##', '# %%', '#%%', '# '] +let g:ipython_cell_highlight_cells = 1 + let g:ipython_cell_run_command = 'Base.run(`clear`); include("{filepath}")' let g:ipython_cell_cell_command = 'include_string(Main, clipboard())' +" REPL hotkeys. Overwrites default slime studio stuff + " Run entire file from top to bottom +nnoremap f :IPythonCellRun + " Run current cell +nnoremap r :IPythonCellExecuteCell +nnoremap e :IPythonCellExecuteCellJump + " Insert block seperator above +nnoremap b OS## Blockvb + " vim: set ff=unix ft=vim: diff --git a/vim/.vim/init_scripts/external_plugins.vim b/vim/.vim/init_scripts/external_plugins.vim index b1cee48..ace0da4 100644 --- a/vim/.vim/init_scripts/external_plugins.vim +++ b/vim/.vim/init_scripts/external_plugins.vim @@ -56,6 +56,8 @@ Plug 'jpalardy/vim-slime' Plug 'hanschen/vim-ipython-cell' " Jupyter notebooks intergration Plug 'jupyter-vim/jupyter-vim' + " Live-editing notebooks in vim +Plug 'untitled-ai/jupyter_ascending.vim' " Language specific ================================================= " Syntax support ====