Vim IM Control

by hideakitai
5
4
3
2
1
Score: 62/100

Description

Category: Coding & Technical Tools

The Vim IM Control plugin enables seamless management of input methods (IM) in Obsidian's Vim mode. It provides the ability to switch input methods automatically upon entering or leaving insert mode, ensuring a smooth typing experience. The plugin supports macOS, Windows, and Linux and allows users to configure their preferred IM commands for each platform. With default integrations like im-select for macOS and Windows or fcitx5-remote for Linux, users can also customize the settings for other IM controllers. Additional features include asynchronous switching and optional status bar notifications for errors or warnings, offering flexibility and efficiency for users relying on multiple input methods.

Reviews

No reviews yet.

Stats

22
stars
3,728
downloads
2
forks
873
days
35
days
35
days
5
total PRs
0
open PRs
0
closed PRs
5
merged PRs
2
total issues
0
open issues
2
closed issues
0
commits

Latest Version

a month ago

Changelog

What's Changed

New Features

  • Workspace vim-mode-changed event: Third-party plugins with standalone CodeMirror vim editors can now trigger IM switching via app.workspace.trigger('vim-mode-changed', { mode })

Bug Fixes

  • Linux: restore previous IM state on InsertEnter: Previously, entering Insert mode always activated Japanese IM (fcitx5-remote -o). Now the plugin saves and restores the previous IM state using the {{im}} placeholder, matching macOS/Windows behavior
  • Trim stdout when caching IM state: Fix trailing newline in cached IM state that could break command substitution (affects all platforms)

Infrastructure

  • Add GitHub Actions release workflow for automated releases

Full Changelog: https://github.com/hideakitai/obsidian-vim-im-control/compare/0.1.3...0.2.0

README file from

Github

Vim IM Control for Obsidian

Control Input Method (IM) when InsertLeave and InsertEnter in Vim mode. Supports macOS, Windows, and Linux.

Usage

You can set the following four settings for each platform. If you want to use the InsertEnter command, you should also set the Get Current IM command to restore the state of IM. If you leave blank either of them, InsertEnter will be skipped.

The default settings are defined as below. For the defaults, im-select is used for macOS and Windows, and fcitx5-remote for Linux. But you can use any IM controller as you want.

Note: Please restart Obsidian after installing this plugin.

macOS

PATH to IM Controller: "/opt/homebrew/bin",
On InsertLeave: "im-select com.apple.keylayout.ABC",
On InsertEnter: "im-select {{im}}",
Get Current IM: "im-select",

Windows

PATH to IM Controller: "%USERPROFILE%\\AppData\\Local\\bin",
On InsertLeave: "im-select.exe 1033",
On InsertEnter: "im-select.exe {{im}}",
Get Current IM: "im-select.exe",

Linux

fcitx5-remote (default)

PATH to IM Controller: "/usr/bin",
On InsertLeave: "fcitx5-remote -c",
On InsertEnter: "fcitx5-remote -o",
Get Current IM: "fcitx5-remote",

fcitx-remote

PATH to IM Controller: "/usr/bin/fcitx-remote"
On InsertLeave: "fcitx-remote -c"
On InsertEnter: "fcitx-remote -o"
Get Current IM: "fcitx-remote"

ibus

PATH to IM Controller: "/usr/bin/ibus"
On InsertLeave: "ibus engine xkb:us::eng"
On InsertEnter: "ibus engine {{im}}"
Get Current IM: "ibus engine"

Other Configuration

Async Switch

Whether to switch IM asynchronously or not. Default: true

Status Bar Message

Whether to show ERROR/WARN messages on Status Bar. Default: false

Limitaion

For Linux, this plugin does NOT support Obsidian installed from Snap or Flatpak. Please try AppImage or deb file.

LICENSE

MIT

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.