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

Ctrl-S doesn't seem to work at all #1322

Closed
dbikel opened this issue May 11, 2022 · 7 comments
Closed

Ctrl-S doesn't seem to work at all #1322

dbikel opened this issue May 11, 2022 · 7 comments

Comments

@dbikel
Copy link

dbikel commented May 11, 2022

C-s seemed to be bound initially to both the Find Next action as well as emacs-mcx.isearchForward. However, this sort of worked, in that hitting C-s would bring up the native VSCode "Find" overlay in the upper right-hand corner, but the focus would not be on it, so it would require a mouse click to enter a search string. Subsequent hitting C-s would then search for that string.

This is quite different from true emacs-style incremental search, in which one hits C-s then immediately starts typing characters, and the search string is found (or not) as typing happens, with subsequent C-s resulting in finding subsequent instances of the current search string, if any.

Is true emacs-like increment search (both forward and backward) in the works? Or is there a particular trick to enabling it? I tried removing the the C-s keybinding from "Find Next", but this resulted in nothing happening when hitting C-s.

Note that none of the above is related to the editor.find.seedSearchStringFromSelection setting (which I disabled).

@dbikel dbikel changed the title Ctrl-S doesn't seem to provide true emacs-like interactive search Ctrl-S doesn't seem to work at all May 24, 2022
@whitphx
Copy link
Owner

whitphx commented May 27, 2022

hitting C-s would bring up the native VSCode "Find" overlay in the upper right-hand corner, but the focus would not be on it

That's weird. It does not happen in my env (macOS, VSCode 1.67.2 (Universal)) and the find widget gets focused with the first C-s hitting.

  • Please describe your environment, e.g. OS, VSCode version, or any other special configs if exist
  • Please try the lower versions of this extension than v0.41.0. Since then, the implementation of C-s has been changed.

@dbikel
Copy link
Author

dbikel commented May 31, 2022 via email

@whitphx
Copy link
Owner

whitphx commented May 31, 2022

both the native Find command and the extensions' isearchForward command?

Should this "the native Find command" be "the native Find Next command"?
If so, that's normal and intended.
Grep "ctrl+s" in https://github.com/whitphx/vscode-emacs-mcx/blob/main/package.json then you can find

vscode-emacs-mcx/package.json

Lines 2436 to 2440 in b858fda

{
"key": "ctrl+s",
"command": "emacs-mcx.isearchForward",
"when": "!findInputFocussed"
},

and

vscode-emacs-mcx/package.json

Lines 2441 to 2445 in b858fda

{
"key": "ctrl+s",
"command": "editor.action.nextMatchFindAction",
"when": "findInputFocussed"
},

which shows that these commands are both assigned to C-s with different conditions so that the first C-s opens the find widget (emacs-mcx.isearchForward) then the subsequent C-s triggers the native Find Next command (editor.action.nextMatchFindAction).

@dbikel
Copy link
Author

dbikel commented May 31, 2022 via email

@whitphx
Copy link
Owner

whitphx commented Jun 1, 2022

Thanks, so it's because you are using an older version of VSCode.
Please see #1279 (comment)

As the versions of this extension between v0.41.0 and v0.42.0 have invalid version compatibility metadata and cause confusion like yours, I wanted to unpublish these versions, but could not: microsoft/vsmarketplace#235

@dbikel
Copy link
Author

dbikel commented Jun 1, 2022 via email

@whitphx
Copy link
Owner

whitphx commented Jun 3, 2022

👍
Thank you for your sponsorship!

@whitphx whitphx closed this as completed Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants