spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.27k stars 1.61k forks source link

use spyder console to git, display vim pattern , then no action with pressing key #16010

Closed Liang200018 closed 3 years ago

Liang200018 commented 3 years ago

Issue Report Checklist

Problem Description

When I want to use spyder console to use git command, I sometimes meet it turn out the vim pattern. I press vim (i, a, o...) but without action. And I can only restart spyder console.

What steps reproduce the problem?

  1. use !git commit
  2. use !git push

What is the expected output? What do you see instead?

just like cmd command, I input :wq, it will quit the vim pattern. But the spyder console no action.

Paste Traceback/Error Below (if applicable)

"~/git_repository/airflow/.git/COMMIT_EDITMSG" 15L, 352C▽ # Please enter the commit message for your changes. Lines starting with '#' will be ignored, and an empty message aborts the commit. On branch local Your branch is up to date with 'origin/local'. Changes to be committed: modified: dwd2dws.py modified: ods2ads.py

Untracked files: ../../../.DS_Store ../../../.spyproject/

~
~ ~ ~ ~ ~ ~ ~ ~ [?25hType :qa and press to exit Vim[?25h

Versions

Dependencies

# Mandatory:
applaunchservices >=0.1.7       :  0.2.1 (OK)
atomicwrites >=1.2.0            :  1.4.0 (OK)
chardet >=2.0.0                 :  4.0.0 (OK)
cloudpickle >=0.5.0             :  1.6.0 (OK)
diff_match_patch >=20181111     :  20200713 (OK)
intervaltree >=3.0.2            :  3.1.0 (OK)
IPython >=7.6.0                 :  7.22.0 (OK)
jedi =0.17.2                    :  0.17.2 (OK)
jsonschema >=3.2.0              :  3.2.0 (OK)
keyring >=17.0.0                :  22.3.0 (OK)
nbconvert >=4.0                 :  6.0.7 (OK)
numpydoc >=0.6.0                :  1.1.0 (OK)
parso =0.7.0                    :  0.7.0 (OK)
pexpect >=4.4.0                 :  4.8.0 (OK)
pickleshare >=0.4               :  0.7.5 (OK)
psutil >=5.3                    :  5.8.0 (OK)
pygments >=2.0                  :  2.8.1 (OK)
pylint >=1.0                    :  2.7.4 (OK)
pyls >=0.36.2;<1.0.0            :  0.36.2 (OK)
pyls_black >=0.4.6              :  0.4.6 (OK)
pyls_spyder >=0.3.2             :  0.3.2 (OK)
qdarkstyle >=2.8;<3.0           :  2.8.1 (OK)
qtawesome >=0.5.7               :  1.0.2 (OK)
qtconsole >=5.0.3               :  5.0.3 (OK)
qtpy >=1.5.0                    :  1.9.0 (OK)
rtree >=0.8.3                   :  0.9.7 (OK)
setuptools >=39.0.0             :  52.0.0.post20210125 (OK)
sphinx >=0.6.6                  :  4.0.1 (OK)
spyder_kernels >=1.10.2;<1.11.0 :  1.10.2 (OK)
textdistance >=4.2.0            :  4.2.1 (OK)
three_merge >=0.1.1             :  0.1.1 (OK)
watchdog >=0.10.3;<2.0.0        :  1.0.2 (OK)
zmq >=17                        :  20.0.0 (OK)

# Optional:
cython >=0.21                   :  0.29.23 (OK)
matplotlib >=2.0.0              :  3.3.4 (OK)
numpy >=1.7                     :  1.20.1 (OK)
pandas >=1.1.1                  :  1.2.4 (OK)
scipy >=0.17.0                  :  1.6.2 (OK)
sympy >=0.7.3                   :  1.8 (OK)
steff456 commented 3 years ago

Hi @Liang200018,

This behavior works outside of Spyder in a qtconsole? Can you please also post here a gif?

Liang200018 commented 3 years ago

I try to meet the situation some days ago. So I reply you lately. Today I meet it , I use spyder, then I try to use qtconsole. The same situation. I use !git pull. Then it happens as below image

image

steff456 commented 3 years ago

Hi @Liang200018,

I could reproduce this issue, we will see how to figure this out. For now, I recommend you to install spyder-terminal, the latest release is compatible with Spyder 5.0.5 and it enables you to have a system terminal inside Spyder.

Liang200018 commented 3 years ago

I use mac, I open the spyder, but it has no spyder-terminal. I have installed the spyder-terminal, and my spyder version is 5.0.5. And I install the rust.

Liang200018 commented 3 years ago

Is this the system terminal? I suddenly found it on the view -> pines -> terminal. base) bash-3.2$

ccordoba12 commented 3 years ago

Is this the system terminal?

Yeah, that's Spyder-terminal.

ccordoba12 commented 3 years ago

I'm going to close this issue because there's nothing we can do about it. Basically our IPython consoles don't allow to work with terminal programs that require user interaction (such as Vim).

The reason for that is that they are graphical widgets not based in technologies used by normal terminal programs. Precisely to avoid that limitation we created Spyder-terminal.

Liang200018 commented 3 years ago

Thank you very much!