hiro-sun / vscode-emacs

91 stars 103 forks source link

isearch (C-s) followed by movement key (C-n, C-p, etc.) doesn't work #29

Open vvuk opened 7 years ago

vvuk commented 7 years ago

In emacs, starting an isearch via C-s, typing a few things, and then hitting a movement key such as C-f or C-n causes isearch to end and for the point to move based on wherever it was during the isearch operation. This isn't the behaviour of vs-code's search; the regular keybindings aren't available while in isearch (hitting C-n opens a new tab, for example), and the search window is "sticky"; hitting C-s again even after manually clicking to a window searches again for whatever one was searching for last.

savioret commented 7 years ago

I make use of those keybindings which make the search behave a you describe, more or less like emacs does:

    {
        "key": "enter",
        "command": "closeFindWidget",
        "when": "editorFocus && findWidgetVisible"
    },
    {
        "key": "up",
        "command": "closeFindWidget",
        "when": "editorFocus && findWidgetVisible"
    },
    {
        "key": "down",
        "command": "closeFindWidget",
        "when": "editorFocus && findWidgetVisible"
    },
    {
        "key": "ctrl+p",
        "command": "closeFindWidget",
        "when": "editorFocus && findWidgetVisible"
    },
    {
        "key": "ctrl+n",
        "command": "closeFindWidget",
        "when": "editorFocus && findWidgetVisible"
    },

Add to your keybindings file the additional ones you want to force the findWidget to close