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

bug: arrows don't work for cmdline history navigation #288

Closed
kpeters-cbsi opened this issue Jun 24, 2020 · 13 comments · Fixed by #334
Closed

bug: arrows don't work for cmdline history navigation #288

kpeters-cbsi opened this issue Jun 24, 2020 · 13 comments · Fixed by #334
Labels
bug Something isn't working upstream:vscode

Comments

@kpeters-cbsi
Copy link

I use regexen extensively in vim / neovim. Often I will mess up a regex somehow and need to correct it, and I do that by editing it from my search history (i.e. in vim, hitting "/" then pressing up arrow until I reach the regex I want to edit). How do I do this in vscode-vim? I've been having to spawn vim in a terminal, do the regex stuff, and then exit.

@chrisjaquet
Copy link

I have the same question and would extend it to command history too.

@theol0403
Copy link
Member

Yeah, for some reason the arrows don't work in command mode anymore. I tried installing some very old versions of this plugin and still could not get it to work, so I assume an update to VSCode broke it, not this plugin. Trying to manually map the arrow keys don't work either, however, putting this in your keybindings is a mediocre fix:

    {
        "command": "vscode-neovim.history-up-cmdline",
        "key": "ctrl-p",
        "when": "neovim.mode == cmdline_normal"
    },
    {
        "command": "vscode-neovim.history-down-cmdline",
        "key": "ctrl-n",
        "when": "neovim.mode == cmdline_normal"
    },

@chasingmaxwell
Copy link

I remember this working for me and I don't think it was too long ago. It no longer does, but that workaround did the trick for now. Thanks @theol0403!

@genso
Copy link

genso commented Jul 19, 2020

It works also for me!. Thanks to @theol0403

@Shatur
Copy link
Collaborator

Shatur commented Aug 1, 2020

@theol0403, thanks!
@asvetliakov, maybe made this shortcuts by default? By default <C-p> and <C-n> works in Neovim for search too.

@asvetliakov asvetliakov added the bug Something isn't working label Aug 24, 2020
@bisho
Copy link

bisho commented Sep 3, 2020

If you could get arrows to work will be ideal. Muscle memory is hard to change. I have seen other vim integrations that even include a drop-down with the history, so moving up/down is easier.

@asvetliakov
Copy link
Member

VSCode started to disallow to remap <up>/<down> in quick pick. Blame vscode devs ! 👿 👿 👿

@uladkasach
Copy link

@asvetliakov Any thoughts on moving the command line to the VSCode status bar (the bottom bar in the ide)?

The VSCodeVim extension exposes the vim commandline in that bar - it shows what you're typing and allows you to navigate through history with arrow keys due to it. Could resolve this problem

@theol0403
Copy link
Member

@uladkasach It would be worth considering, and also solve a few other problems regarding quickpick's limitations (and support more bindings). However, the largest drawback is showing completions - any idea how that could be done?

@micimize
Copy link

micimize commented Jan 2, 2023

@theol0403 VSCodeVim implemented this in https://github.com/VSCodeVim/Vim/pull/2758/files. Some asked for the ability to move it back (VSCodeVim/Vim#2773, VSCodeVim/Vim#3602) but I'd say : opening in quick open is one of the biggest cons transitioning from VSCodeVim to vscode-neovim so far.

Though, I think a really good approach to multiple buffers (#505) might lead to the most optimal, fully-featured command buffer. Maybe something leveraging horizontal splits. View: Toggle Split Editor In Group and View: Toggle Layout of Split Editor in Group can be used to make "borderless" splits of the same file, and microsoft/vscode#36700 (comment) implies there might be a way to do that using some custom view.

@theol0403 theol0403 reopened this Dec 31, 2023
@theol0403 theol0403 changed the title [help] Search history? bug: arrows don't work for cmdline history navigation Dec 31, 2023
@theol0403
Copy link
Member

Still not fixed, waiting for

microsoft/vscode#196899

@theol0403
Copy link
Member

Fixed by #2001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream:vscode
Projects
None yet