Studio Code Server - Vim Plugin not starting up reliably?

I’m using the Studio Code Server addon for HA, and inside VS Code I’m using the vscodevim plugin.

Sometimes I can get the plugin to work, sometimes not.

By “not work”, I mean that hitting Esc won’t ever pop me from Vi style insert mode into normal mode (where keys navigate rather than enter text)

Sometimes if I disable it, and then enable it, I can get it to start up.

If I can’t get the vscodevim plugin working inside of the Home Assistant VM, what about installing neovim inside of the HA VM?

Seems like the path of least resistance may be just mounting the samba share, but I’m not a big fan of keeping a disk forever mounted in Samba, when it could be taken care of with something on demand like neovim inside the VM and just connecting to that via real SSH…

Turns out that the HA VM is based on “Alpine Linux”, which uses the apk package manager.

You can easily install neovim, zsh and many other packages just running:

apk add neovim
apk add ripgrep
apk add zsh

I wouldn’t recommend doing this if you’re not very familiar with Linux, and I wouldn’t be surprised if your list of added packages gets blown away by upgrades, I haven’t tested either way.

If you want to really use Vi with Home Assistant, apk add neovim is a great way to go.

You can automatically add the packages you require via the SSH Configuration’s packages entry.

Packages that you want automatically available in your container via SSH, just add to the SSH Add-On’s Configuration YAML like:

  - zsh
  - autossh
  - mosh
  - ripgrep
  - neovim
  - curl
  - wget

Also, I highly recommend using the 3rd party SSH & Web Terminal for SSH rather than the default Home Assistant Core SSH, because the 3rd party one at least let’s you auto execute some commands on initialization under, for example to auto load a terminal emulator’s terminfo profile:

  - mkdir -p ${HOME}/.terminfo/x
  - ln -s /data/xterm-kitty ${HOME}/.terminfo/x/xterm-kitty

I’m a heavy daily user of Neovim, but wouldn’t the default vim installation do?