Helix Motions

by kote-pdj
5
4
3
2
1
Score: 51/100

Description

A full, faithful port of Helix editing to Obsidian, tested against Helix itself.

Reviews

No reviews yet.

Stats

12
stars
298
downloads
2
forks
25
days
0
days
5
days
3
total PRs
0
open PRs
1
closed PRs
2
merged PRs
0
total issues
0
open issues
0
closed issues
103
commits

Latest Version

6 days ago

Changelog

  • Helix Motions runs on helix-cm6 0.1.3 and follows Helix at commit a714a818a3.
  • :reflow fills each line as full as it can and counts tabs at their real width.
  • Ctrl-o and Ctrl-i bring a jump back exactly where it was, also after an undo.
  • The jumplist picker shows where each jump is now, also after edits above it.

README file from

Github

Helix Motions

Helix Motions brings Helix editing to Obsidian. It is ported from Helix's source and tested against real Helix.

Six cursors from one regex select, with the selection count in Helix's statusline

  • Use Helix's keymap, selections, multiple cursors, registers, macros, undo tree, text objects, surround and jump labels.
  • Copy your Helix config into your vault, and it works.
  • Reach Obsidian through Helix's keys: Space f opens the quick switcher, and gd follows a link.
  • Move through Live Preview tables, with cursors across cells and cell selections.

More in docs/screenshots, each in dark, light and both.

Installation

  1. Open Settings → Editor, and turn off Vim key bindings. Turn off other Vim plugins.
  2. Open Settings → Community plugins.
  3. Select Browse, then search for Helix Motions.
  4. Select Install, then Enable.

Or install it from its page in Obsidian's plugin directory.

Requires Obsidian 1.15 or later, on desktop.

To install manually, download main.js, manifest.json and styles.css from the latest release into <vault>/.obsidian/plugins/helix-motions/.

Usage

Press Space or g to see the keys in a menu. Everything else works as it does in Helix.

To change keys and options, open Settings → Helix Motions. The editor there has Helix keys, and edits helix.toml in the root of your vault:

[editor]
scrolloff = 3
color-modes = true

[keys.normal]
"C-s" = ":write"

[keys.normal.space]
o = "switcher:open"

Helix's own commands keep their names. Any Obsidian command works too, by its id.

Documentation

Compatibility

Helix Motions follows Helix at commit a714a818a3. Every Helix editing command is here. Commands that need a shell, a language server or a debugger are not, and show a message instead. docs/scope.md lists every command and option.

The Helix engine is helix-cm6. About 44,000 key sequences run in real Helix and in the engine, and the text, the selections and the mode after each one must match exactly.

Develop

See Contributing and Testing.

Credits

The Helix engine is ported from Helix at commit a714a818a3, under the Mozilla Public License 2.0, including the injection layers of tree-house. Syntax trees come from tree-sitter and tree-sitter-markdown (MIT). The way to end IME composition in normal mode comes from codemirror-vim.

License

MPL-2.0