Vscode-neovim: Temporarily enter command mode from insert mode with ctrl+o

Created on 12 Feb 2020  ·  3Comments  ·  Source: asvetliakov/vscode-neovim

As I gather, this plugin „unbinds self from the type event“. Which I like in general… except: What would it take to allow ctrl+o to temporarily enter command mode from insert mode? It seems to work in principle with other mappings such as ctrl+r.

enhancement help wanted

Most helpful comment

For now, I added this to my keybindings.json. Seems to work so far.

{
    "key": "ctrl+o",
    "command": "vscode-neovim.send",
    "args": "<c-o>",
    "when": "editorTextFocus && neovim.mode == insert"
}

Great stuff! 👍

All 3 comments

This may work by just enabling <C-o> in package.json while being in insert mode (will route the request to neovim and it will trigger command line mode event which will be handled by extension). Not sure about consequences though

For now, I added this to my keybindings.json. Seems to work so far.

{
    "key": "ctrl+o",
    "command": "vscode-neovim.send",
    "args": "<c-o>",
    "when": "editorTextFocus && neovim.mode == insert"
}

Great stuff! 👍

It doesn't work as expected.

Reproduce

  1. open test.txt
  2. press "i" and input "test"
  3. press "ctrl+o" and "2h"
  4. the cursor stays on the position behind "test".

The cursor should lie between "t" and "e".

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hholst80 picture hholst80  ·  3Comments

albert-ying picture albert-ying  ·  4Comments

bogdan0083 picture bogdan0083  ·  4Comments

anhyeast picture anhyeast  ·  5Comments

iansinnott picture iansinnott  ·  4Comments