-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[enhancement] Add an option to clear screen every time code is sent #25
Comments
Problem: jupyter-vim#25 'How can i send `clear-screen` before each execute_request (exept itself) Solution: Add string variable considered at each send request
Brief: I've just coded this feature (1939006), jump to 'get-it' if you want to use it. Now: I added 4 variables
Get it: In you jupyter-vim directory: git fetch
git check dev In your vimrc: autocmd FileType python let b:jupyter_exec_before = 'clear-screen' Before: (Do not do it) python3 _jupyter_session.client.send_save = _jupyter_session.client.send
python3 _jupyter_session.client.send = lambda cmd : _jupyter_session.client.send_save('print("pre")') and _jupyter_session.client.send_save(cmd) and _jupyter_session.client.send_save('print("post")') After: (More implementation independent) autocmd FileType python let b:jupyter_exec_before = 'clear-screen' I'll try to solve #24 which will be annoying for |
Problem: jupyter-vim#25 'How can i send `clear-screen` before each execute_request (exept itself) Solution: Add a string variable that is considered at each send request
Tell me if you like this way. Thank you for raising the issue: for the feedback. |
Problem: #25 'How can i send `clear-screen` before each execute_request (exept itself) Solution: Add a string variable that is considered at each send request
I like this idea... but should these vim variables be buffer-local so the user can set them per language? For example in iPython I use |
Yes it would be better as buffer local. More coherent and extendable. Multi kernel support requires very little addition now but the global I've just put breaks that.
…On Thu, Apr 9, 2020, 23:40 Bernard Roesler ***@***.***> wrote:
I like this idea... but should these vim variables be buffer-local so the
user can set them per language? For example in iPython I use >>> !clear
to clear the external shell screen, but that may vary on other interpreters.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOXDOSPGDYNN7ADNNHY4ADRL2BJNANCNFSM4MDAGPGQ>
.
|
I changed it, updated the doc and the comment above: autocmd FileType python let b:jupyter_exec_before = 'clear-screen' |
I'm not sure if I am doing something wrong but after running |
|
What type of log shoudl I provide to debug this? |
Very good question, There is no protocol yet. The trust is in the code. You can start with loading order in this wiki or trust my 1,2,3. 1 plugin1.5: 2 autoload2.1: 3 python3.1/ |
@jagjordi did you fix it ? How ? I added a troobleshoot wiki |
Sorry for the late response. Now It works fine, the problem was that I was using |
Some times you want to run code in a clean terminal, you would do that with
clear-screen
command in IPython. It would be nice if some sort of setting through a global variable could be enabled so every time you send code from vim:JupyterRunFile
theclear-screen
command also gets send just before.Regards.
The text was updated successfully, but these errors were encountered: