Support VIM on mobile without a physical keyboard (implement extended virtual keyboard)

Use case or problem

Vim mode is useless on mobile version because there is no way out of insert mode without an external keyboard. I am starting to use more Obsidian on my mobile out on the street and selecting text without vim is very hard on a touchpad

Proposed solution

I suggest devs take a look at Droidvim as it adds two rows of keys on top of usual Gboard keyboard and makes using vim possible without the need to mess with keyboard layout or installing a third party app.

Thanks

7 Likes

I would love it if the mobile buttons could function as Esc, Ctrl, and Alt.

2 Likes

Termux app on mobile is a good example of how the buttons should work.

2 Likes

Exactly , many apps has their own buttons. There is no need to has as many options as Termux tho, only a Esc key to move out of insert mode is enough IMO.

There is a way out of normal mode even without an escape key: you can map a double key (say “jj”) to Esc, in the Obsidian .vimrc.

1 Like

renamed this feature request

Platform

[ x ] iOS
Android

Obsidian Mobile version: v1.0.4


Since there is no escape key on the virtual keyboard it would be helpful to have a key on the mobile keyboard that issues an escape. This is useful for dismissing panels such as the command palette.

3 Likes

I have mapped the physical CAPS lock on my keyboard on my tablet to be escape. this at least helps in that scenario.

otherwise doesn’t tapping outside the command palette close it?

That’s a good workaround. The tap targets to dismiss the command palette on iPhone are extremely small (and narrow). This makes dismissing with one hand very difficult. Obsidian on iOS feels awkward and this is a good example that may reduce adoption.

1 Like

It’s actually worse than just the virtual keyboard. Because the virtual keyboard does not have an escape key, if you use a Bluetooth keyboard (like I am doing now) with my IPad and have VIM mode turned on the escape key on the keyboard does not work either. (I have not tried to re-map it…maybe that’s all I need to do?)

I’ve confirmed it’s not the keyboard either because esc works in other apps (on the physical keyboard)

1 Like

How did you do this?

Thanks!

I feel your frustration. If you are running Android have a look at the jbak2keyboard. It is totally configurable including what keys are displayed & where. I set up a configuration that incluses ESC, Tab, Ctrl & a few other keys to ease use of Vim keybindings. No longer available on Playstore, but with a quick search you should find it. I have used it for years & find it better than Hackers keyboard. Well worth a plow through the help files to learn how to use it.

If only the Vim command line worked…

Cheers & happy keyboard tweaking.