Skip to content
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

Allow binding external tools to hotkeys #258

Open
4 tasks done
kbauer opened this issue May 20, 2021 · 2 comments
Open
4 tasks done

Allow binding external tools to hotkeys #258

kbauer opened this issue May 20, 2021 · 2 comments

Comments

@kbauer
Copy link

kbauer commented May 20, 2021

Issue Report Checklist

Not really applicable, because it is an enhancement request. The relevant subset:

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

In many cases it would be useful to run custom shell commands from within the IDE: Examples include:

  • Static code analysis tools, that are not directly supported
  • importmagic or similar refactoring tools
  • Invoking build systems
  • Invoking version control tools (e.g. git gui).

In order to be useful, such a feature would need to support at least:

  • Binding to hotkeys and presence in the menu-bar.
  • Display of the output in a pane, preferably separate from the regular Console pane.
  • Passing information about the invocation context (such as the path of the active file in the editor) to the command.

Desirable additional features include:

  • Turning common file/line-number patterns into clickable links, e.g. compiler-warning style lines of the form relative/path/to/file.py:123: message.
  • Declare, that the file should be saved before invoking the command.
  • Declare, that the command is expected to change files opened in the editor, and automatically reload them after the command finishes.
  • Declare, that the command is interactive, and automatically focus the command pane.
  • Declare that the command should continue running in the background, even if new commands are executed (e.g. git gui).

Currently the closest feature is invoking the iPython magic syntax ! command in the ipython shell, but the iPython shell may be set to a working directory other than the source code directory, and typing out long commands repeatedly makes them less useful.

Versions

Python 3.9.4 64-bit | Qt 5.9.7 | PyQt5 5.9.2 | Linux 4.12.14-lp151.28.91-default

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  1.6.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.0.2 (OK)
IPython >=7.6.0               :  7.23.1 (OK)
jedi =0.17.2                  :  0.17.2 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  23.0.1 (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.9.0 (OK)
pylint >=1.0                  :  2.7.2 (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.4.0    :  0.3.2 (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.2.0 (OK)
qtawesome >=1.0.2             :  1.0.2 (OK)
qtconsole >=5.1.0             :  5.1.0 (OK)
qtpy >=1.5.0                  :  1.9.0 (OK)
rtree >=0.8.3                 :  0.9.7 (OK)
setuptools >=39.0.0           :  49.6.0.post20210108 (OK)
sphinx >=0.6.6                :  4.0.1 (OK)
spyder_kernels >=2.0.2;<2.1.0 :  2.0.3 (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)
xdg >=0.26                    :  0.26 (OK)
zmq >=17                      :  22.0.3 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=2.0.0            :  None (NOK)
numpy >=1.7                   :  None (NOK)
pandas >=1.1.1                :  None (NOK)
scipy >=0.17.0                :  None (NOK)
sympy >=0.7.3                 :  None (NOK)
@andfoy
Copy link
Member

andfoy commented May 20, 2021

Hi @kbauer, thanks for the suggestion! This will be taken into account in the near future when Spyder-Terminal is migrated to allow console program execution from the editor. Right now, the Spyder team is focusing in stabilizing all the plugins after the Spyder 5 release, however, we will come back to this feature request later on.

@ccordoba12
Copy link
Member

As @andfoy said, I think this is a feature request for spyder-terminal, i.e. adding buttons or menu entries that allow bash/batch scripts to be executed directly there.

Therefore, I'm going to be move this issue to that repo.

@ccordoba12 ccordoba12 transferred this issue from spyder-ide/spyder May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants