vim-slime
vim-slime copied to clipboard
E471: Argument required
I am running Vim 8.2
on Windows 10
.
The command :SlimeSendCurrentLine
works well, but the :SlimeSend
, :SlimeSend0
and :SlimeSend1
give me the error E471: Argument required.
The only things related to vim-slime on my .vimrc
are the following:
let g:slime_python_ipython = 1
let g:slime_target = "vimterminal"
let g:slime_cell_delimiter = "# %%"
Any hint on how to fix the problem?
Hi @Barzi2001
Do you know what line/function is causing a problem?
If you give me a step-by-step, I can try to reproduce (minx the windows 10 part)
Actually all give me problems. You can try for example this:
# %%
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
A = 3
B = 4
C = A + B
# %%
Hi @Barzi2001
what I did:
- new docker container, ubuntu:latest image
- put (only) your config in .vimrc
- install vim, ipython3, vim-slime
- start vim,
:terminal
,ipython3
- sent text with
ctrl-c
ctrl-c
- picked existing terminal (no 1)
…
I skipped the imports, not sure it was relevant to this problem
# ipython3 --version
7.13.0
🤔
if you have a better step-by-step, I'm willing to try that. It might be a problem with versions too.
A docker recipe would be appreciated, if possible. (or instructions for specific versions)
OK! Perhaps for Windows
users the best would be to work via Docker
.
I haven't a better step-by-step, I think that such a minimal example above should be enough.
Yeah, the ipython
version may be a problem,
PS C:\Users\yt75534> ipython3.exe --version
7.22.0
This certainly looks like it's breaking on the vim-slime side (rather than anything having to do with Windows and/or ipython)
:help e471
says
E471
Argument required
This happens when an Ex command with mandatory argument(s) was executed, but
no argument has been specified.
which isn't exactly enlightening… 😐
If you want to sprinkle the plugin code with echom and let me know what you find, I can try to help.
I am not sure I can use this feature, but I run :echom
followed by :SlimeSend0
obtaining the same e471
error again with no more info (I also checked in :messages
).
I also tried to uninstall/reinstall the plugin but it didn't help.
Unrelated: every time I try to use vim-slime I have to run :SlimeConfig
manual and select the target window of my slimes.
I am aware that in specify a default terminal in my .vimrc
, but what shall I write if I have a cryptical message like this? What is the terminal name and the session name?!
Hi @Barzi2001
I use tmux because I can default to
let g:slime_target = "tmux"
let g:slime_default_config = {"socket_name": "default", "target_pane": "{last}"}
let g:slime_dont_ask_default = 1
and {last}
"just works"…
if there's a vimscript way to inspect and (intelligently) pick the vim-terminal … it's not part of the plugin 😩
UPDATE: If I run e.g. :SlimeSend0 1000
, then 1000
is "slimed" to the REPL
.
I am not sure, but it seems the argument to be passed to :SlimeSend0
is what is in between the delimiters (# %%
in my case) and it seems that the command :SlimeSend0
simply fails at picking it?
:SlimeSend0
and :SlimeSend1
are not overly publicized. They take strings as argument and directly send those over (no relation to buffer content or selection)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.