whatisgithub

What is hamal.nvim?

ergodice/hamal.nvim — explained in plain English

Analysis updated 2026-05-18

43LuaAudience · developerComplexity · 2/5Setup · easy

In one sentence

A Neovim plugin that lets you jump to any visible line in a handful of keystrokes by repeatedly splitting the window into chosen sections.

Mindmap

mindmap
  root((hamal.nvim))
    What it does
      Splits window into sections
      Jump to any line fast
      Works with pending operators
    Tech stack
      Lua
      Neovim
    Use cases
      Fast line navigation
      Delete or yank to a line
      Skip manual scrolling
    Audience
      Neovim users
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Jump to any visible line in a large file in a handful of keystrokes.

USE CASE 2

Navigate long files without scrolling or typing exact line numbers.

USE CASE 3

Combine line navigation with delete or yank operations in one motion.

What is it built with?

LuaNeovim

How does it compare?

ergodice/hamal.nvimkarpathy/optimgregorias/nvim-surround-wk
Stars434235
LanguageLuaLuaLua
Last pushed2021-08-19
MaintenanceDormant
Setup difficultyeasymoderateeasy
Complexity2/53/51/5
Audiencedeveloperresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Drop-in Neovim plugin with no external dependencies.

So what is it?

hamal.nvim is a plugin for Neovim, the popular text editor, that helps you jump to any visible line on the screen quickly. Instead of scrolling line by line or typing an exact line number, it repeatedly splits the current window into sections and lets you pick which section holds the line you want, narrowing the choice down a few keystrokes at a time until you land exactly where you meant to go. By default the window is split into three parts each time, which means that on a 100 line screen you can reach any line in at most five keypresses. The plugin lets you change how many parts each split makes: fewer parts means slightly more keypresses but simpler choices, while more parts gets you there faster but asks you to tell apart more regions at once. Once installed, you press a keymap to enter Hamal mode, which splits the visible window into labeled sections. Pressing the key for a section focuses that region and splits it again, and you keep narrowing down until you press a key to jump straight to the top, middle, or bottom line of the current region. You can also back out to the previous split, or select the current split as a whole. This mode also works while an editing command is pending, so it can be used to jump to a line and immediately delete or copy text up to that point, in the same way other motions work in Vim style editors. The plugin is configurable: you can change the number of divisions, remap or disable any of its keys, and customize the colors used to highlight each section and the borders between them. It has no external dependencies and is described as lightweight.

Copy-paste prompts

Prompt 1
Add hamal.nvim to my Neovim config with a keymap under leader leader.
Prompt 2
Explain how hamal.nvim's window-splitting navigation reduces keypresses on long files.
Prompt 3
Customize hamal.nvim's highlight colors for each split section.
Prompt 4
Change the number of divisions hamal.nvim uses when splitting the window.

Frequently asked questions

What is hamal.nvim?

A Neovim plugin that lets you jump to any visible line in a handful of keystrokes by repeatedly splitting the window into chosen sections.

What language is hamal.nvim written in?

Mainly Lua. The stack also includes Lua, Neovim.

How hard is hamal.nvim to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is hamal.nvim for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.