nvim-helix-motion

Implement Helix-compatible Neovim motions and keymaps with newline-aware multi-selection semantics.

Updated Jan 25, 2024
One-click install
npx skills add https://github.com/axelcool1234/.dotfiles --skill nvim-helix-motion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nvim-helix-motion
Source: https://github.com/axelcool1234/.dotfiles/tree/main/wrappers/code/skills/nvim-helix-motion
Command: npx skills add https://github.com/axelcool1234/.dotfiles --skill nvim-helix-motion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a precise, repo-specific workflow for adding, fixing, and auditing Neovim motions and keymaps so they behave like Helix motions within this dotfiles Neovim wrapper. It eliminates guesswork about newline-aware coordinates, multi-selection semantics, and local Helix overrides so changes remain consistent with the repository's intended behavior.

Core Features & Use Cases

  • Helix-compatible mapping: Map Helix commands to Neovim keys while honoring local overrides and the remaps.lua layer.
  • Newline-aware and multi-cursor semantics: Preserve newline-as-cell math, anchor/cursor normalization, and consistent behavior across multiple selections.
  • Safe implementation and validation: Prefer local helix helpers, minimize surface changes, snapshot extmarks for multi-edit operations, and validate behavior with headless Neovim smoke tests.
  • Use Case: Convert a Helix surround command like ms<char> into a Neovim implementation that updates selection entries across multiple cursors and passes the headless harness.

Quick Start

Implement or fix a Neovim keybinding so it matches the equivalent Helix motion by inspecting the helix modules in the repository and running the headless Neovim smoke tests.

Frequently Asked Questions about nvim-helix-motion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make Neovim motions behave like Helix?

Helix motions in Neovim require newline-aware position math to treat newlines as cells correctly. This approach preserves anchor and cursor normalization so multi-selection semantics remain consistent across edits.

How do I implement Helix surround commands for multiple cursors in Neovim?

You can implement Helix surround commands like ms<char> by reusing local helix helpers to update selection entries across multiple cursors. Snapshotting extmarks for multi-edit operations ensures changes apply safely without breaking selections.

How do I validate Neovim keymap changes for Helix compatibility?

Validate Neovim keymap changes by running headless Neovim smoke tests. This testing harness confirms that newly mapped Helix motions perform correctly without opening the editor GUI, catching regressions early.

What is the best way to audit existing Neovim keymaps for Helix motion consistency?

Auditing Neovim keymaps for Helix motion consistency involves inspecting the repository's helix modules and remaps.lua layer. You verify that existing bindings preserve newline-aware coordinates and multi-selection semantics.

Why do my Helix multi-selection overrides break in Neovim?

Helix multi-selection overrides break in Neovim when changes ignore local helix helpers or fail to snapshot extmarks during multi-edit operations. Minimizing surface changes and preserving anchor normalization prevents these selection regressions.