hugoh62 downloadsTurn vim key bindings on or off depending on whether you are on desktop or mobile.
An Obsidian plugin that turns Vim key bindings on or off depending on the kind of device Obsidian is running on.
Vim key bindings are great with a hardware keyboard and painful on a phone's
touch keyboard. Obsidian stores the setting in the vault's shared config
(.obsidian/app.json), so with iCloud, Obsidian Sync, Git or any other sync,
switching it on for your laptop switches it on for your phone too. This plugin
sets it per device type each time Obsidian starts.
app.json.main.js and manifest.json from the
latest release.<vault>/.obsidian/plugins/vim-mode-per-device/.Enable the plugin once: the list of enabled plugins syncs with the vault, so it becomes active on every device.
Settings → Vim Mode Per Device:
| Setting | Default | Applies on |
|---|---|---|
| Vim key bindings on desktop | On | macOS, Windows, Linux |
| Vim key bindings on mobile | Off | iOS, iPadOS, Android (phones and tablets) |
Changes apply immediately to the current device. Other devices pick them up the next time Obsidian starts there.
On load, the plugin checks Platform.isMobile and sets Obsidian's vimMode
config to the matching setting. The plugin's own settings are stored in its
data.json and sync with the vault like any other plugin data.
app.vault.getConfig / setConfig, the internal methods behind Obsidian's
settings screens. Many plugins rely on them, but a future Obsidian release
could change them.See CONTRIBUTING.md for development setup and the release process.