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

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

Closed
spyder-bot opened this issue Feb 17, 2015 · 13 comments

Comments

@spyder-bot
Copy link
Collaborator

From ajl...@gmail.com on 2013-11-01T07:53:28Z

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

As a (reluctant) Matlab user myself, I think Matlab's behaviour makes more sense when you are doing interactive work and manually execution your code bit by bit.

So I would propose either changing Spyder's F9 behaviour, or better yet, exposing the new behaviour it as an option.

I'm using Spyder 2.3.0dev6 through WinPython-64bit-3.3.2.3.

Thanks

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1627

@spyder-bot
Copy link
Collaborator Author

From yuvalha...@gmail.com on 2013-11-19T17:31:58Z

The same applies to the "Run cell" command (Ctrl+Enter).
Somewhat oddly, Shift+Enter ("Run cell and advance") does not change focus, so I developed the habit of using Shift+Enter followed by moving up.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-02-07T08:53:48Z

Thanks for reporting. I'll try to fix it in our next release.

Labels: MS-v2.3 Cat-Editor

@spyder-bot
Copy link
Collaborator Author

@spyder-bot
Copy link
Collaborator Author

From sebastia...@gmail.com on 2014-03-02T05:15:22Z

_Please_ do not change this.

This will mess up thing for everyone who used spyder before, this will result in accidetially adding charcters.
Adding a new combination (like SHIFT + F9) or make this an option in the preferences (that is off by default) seems to be a great idea.

Thanks

@spyder-bot
Copy link
Collaborator Author

From contrebasse on 2014-03-03T01:32:54Z

While I understand the concern about both behaviors, adding an option for this seems to be overkill.
Keeping the current behavior seems less error prone as any types character would appear in the console and not in the script.

@spyder-bot
Copy link
Collaborator Author

From yuvalha...@gmail.com on 2014-03-04T20:08:09Z

I don't think that typed characters appearing the script makes this option more "error prone". Scripts that are used with "Run selection" or block mode editing would typically be main-level scripts used similarly to the console anyway, and accidentally typing there is no more dangerous than accidentally typing in the console.
I also don't think that adding an option is an overkill. In fact, I think such an option may be important enough to warrant a toggle button in the main interface (this is similar in spirit to the "lock" button on the Object Inspector).

@spyder-bot
Copy link
Collaborator Author

From ajl...@gmail.com on 2014-03-07T08:09:33Z

I can see that changing the behaviour would upset the current users as much as the current behaviour upsets users coming from Matlab.

While this is a small thing and it may seem like overkill to add an option for it, I strongly feel that we should make the migration from Matlab as painless as possible. That is in the interest of all Python users out there. In fact I would go as far as suggesting a new configuration option for Matlab-like shortcuts, very much like Excel used to have shortcuts for Lotus.

PS: I can program in Python just as well as in Matlab, and I have pushed people around me towards Python but I have faced tremendous resistance. I believe Spyder can help people do the leap.

Cheers

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-03-10T11:04:02Z

That's right, I also think we should provide an option for this behavior. I'll take a look at Sylvain's PR to see if he implemented it already.

@spyder-bot
Copy link
Collaborator Author

From y1t2y...@gmail.com on 2014-03-11T05:41:23Z

I found that "Ctrl + Shift + E" brings back the focus to the Editor. I can live with this for now but would really want to see an option added to configure the default behavior to be like in MATLAB.

@spyder-bot
Copy link
Collaborator Author

From sylvain....@gmail.com on 2014-03-11T16:47:50Z

@-Carlos, the PR just leaves the focus on the editor in the case of Crtl+Enter (like it is already the case for Shift+Enter). No option added, not handling the F9-execute selection case as there was a disagreement on this one.

Indeed, for the execute selection, it would make sense to add an option...

PS: checkout the PR on the highlighting of the current cell. I recall you mentioned this feature in the past. Let me know what you think. Cheers.

@spyder-bot
Copy link
Collaborator Author

From sylvain....@gmail.com on 2014-03-11T16:47:55Z

@-Carlos, the PR just leaves the focus on the editor in the case of Crtl+Enter (like it is already the case for Shift+Enter). No option added, not handling the F9-execute selection case as there was a disagreement on this one.

Indeed, for the execute selection, it would make sense to add an option...

PS: checkout the PR on the highlighting of the current cell. I recall you mentioned this feature in the past. Let me know what you think. Cheers.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-05-04T14:45:47Z

Labels: -MS-v2.3 MS-v2.3.1

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-08-17T08:53:17Z

This issue was closed by revision dc55fafd9941 .

Status: Fixed

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

1 participant