Sypder 2 IDE - keep the focus in the editor after sending selected commands to interpreter

StackOverflow https://stackoverflow.com/questions/21561122

  •  07-10-2022
  •  | 
  •  

Вопрос

I have been using the Spyder IDE for Python and it has been a really smooth and nice ride so far. The productivity improvement seems to be based on the same approach as RStudio.

The main thing that annoys me is that every time I select some python commands to send to my Python command line, the editor loses focus. Is there a setting that allows the editor to keep focus after doing this ? I know that the shortcut for going back to the editor is Shft+Cmd+E.

Это было полезно?

Решение

(Spyder maintainer here) Currently there is no option to change this but I'll try to add it in our next release (since several people has asked for it).

This is the reported issue in our issue tracker, in case you want to subscribe to it to know when it's fixed.

Другие советы

I tracked this 'Reported Issue' back 4 years (#1627 - 2014) and wish to add a small observation. Code should work consistently, given the specifications. A simple statement like: input ("this is my message, enter 1 or 2") should divert the Focus from the editor(Spyder) to the Console, should it not?

In my pure Linux Mate/Mint version 18.3, the Focus remains in the editor!

The same code in DrPython, it does not. It works as I expect.

The same statement in Trinket (web python) also has the same problem, necessitating a click on the input block. Try this...

I appreciate legacy software that relies on the way it always worked (Matlib likes to have the focus back in the editor, for example) must be considered, but is not the "older" issue here the original documented Python 2.7 or Spyder specification?

Is it possible this is an OS issue? - bigger than a language, an editor/ide, or implementation?

"Run selection (F9) changes focus to Python interpreter, but ex-Matlab users expect the focus to remain on the editor #1627"

"Add an option to move focus to console after pressing F5 #2123"

"Console/Editor lose focus when auto-connected to help #3317"

Chrome devtool shortcuts

The Plot Thickens.... From the table (hopefully) below, you can see not all Browsers are alike. It seems to me that since the code is the same, the OS I am using is the same, this issue must be either Browser/IDE related or higher. My Andriod tablet got focus and then lost it (block cursor blinked and then stopped).

The Table shows out of 9 programs, 5 Lost Cursor

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top