You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the vimterminal as my repl and I am getting an indentation error when sending two python functions at once to the repl. For example, with the following script,
deffoo():
return1defbar():
return1
If I put my cursor over def foo and hit <c-c><c-c> then the following happens in the terminal
I am pretty sure that the issue occurs because python does not have an "indentation" closure like basically every other language. For example, I can send the following to the bash repl just fine.
foo() {
echo hello
}
bar() {
echo hello
}
I am pretty sure that this does not cause andissue because bash encloses the indentation in brackets.
I am using the vimterminal as my repl and I am getting an indentation error when sending two python functions at once to the repl. For example, with the following script,
deffoo():
return1defbar():
return1
If I put my cursor over def foo and hit <c-c><c-c> then the following happens in the terminal
I am pretty sure that the issue occurs because python does not have an "indentation" closure like basically every other language. For example, I can send the following to the bash repl just fine.
foo() {
echo hello
}
bar() {
echo hello
}
I am pretty sure that this does not cause andissue because bash encloses the indentation in brackets.
I am actually one of the maintainers of iron.nvim, which is a neovim repl plugin, and I had this same problem with python there. I had to write a very python specific formatter to send lines of code
EDIT:
Also I should add that I just realized that this does not happen on my linux machine, only on mac while using the mac terminal. So the problem most likely has to do with mac and its terminal. Ill leave this issue here for a second as maybe you have a quick solution but if not, feel free to close the issue.
The text was updated successfully, but these errors were encountered:
My quick fix for this is to use ipython instead of the standard python repl in the mac terminal. I tried bracketed_paste but it did not seem to work.
I actually remember having problems on the mac terminal with iron.nvim too and I also had to use ipython there.
When I have some free time, I can try to mess around a little with the vimscript formatter you have, but i'm fine with using ipython in the meantime. Feel free to close this issue if you want!
I am using the
vimterminal
as my repl and I am getting an indentation error when sending two python functions at once to the repl. For example, with the following script,If I put my cursor over
def foo
and hit<c-c><c-c>
then the following happens in the terminalI am pretty sure that the issue occurs because python does not have an "indentation" closure like basically every other language. For example, I can send the following to the bash repl just fine.
I am pretty sure that this does not cause andissue because bash encloses the indentation in brackets.
I am using the
vimterminal
as my repl and I am getting an indentation error when sending two python functions at once to the repl. For example, with the following script,If I put my cursor over
def foo
and hit<c-c><c-c>
then the following happens in the terminalI am pretty sure that the issue occurs because python does not have an "indentation" closure like basically every other language. For example, I can send the following to the bash repl just fine.
I am pretty sure that this does not cause andissue because bash encloses the indentation in brackets.
I am actually one of the maintainers of
iron.nvim
, which is a neovim repl plugin, and I had this same problem with python there. I had to write a very python specific formatter to send lines of codeEDIT:
Also I should add that I just realized that this does not happen on my linux machine, only on mac while using the mac terminal. So the problem most likely has to do with mac and its terminal. Ill leave this issue here for a second as maybe you have a quick solution but if not, feel free to close the issue.
The text was updated successfully, but these errors were encountered: