Skip to main content
Back to blog
Deep dive v0.2.0

We put real Vim mode in a file manager

Vysakh Sreenivasan · · 9 min read

Vim users have a particular kind of suffering: every tool that isn't Vim. You spend years wiring hjkl into your spinal cord, and then you open a file manager and your hands just… stall. So for FileHop 0.2.0 we did the obvious thing nobody does. We put real Vim mode in the file manager — and then we kept going, into the editors, and into your Word documents.

Vim mode in the file navigator — hjkl to move, yy / dd to copy and cut, p to paste, / and \ to search.

Two worlds that never quite met

If you live in the terminal, you already know the keyboard-driven file managers: ranger, lf, nnn, vifm. They're fast and they feel like home — hjkl to move, single keys for everything. But previews are an afterthought: a blurry thumbnail, a line of text, a guess. You're flying blind half the time.

GUI file managers are the opposite. Beautiful previews, real thumbnails, actual editors — and a hard dependency on your mouse for almost everything. You get to see your files, but you have to click them.

We never understood why you had to choose. FileHop already had the previews and the editors. Adding Vim mode meant you could finally have both: keyboard nirvana and a real preview of the file you're about to act on.

Vim in the file grid

Flip on Vim mode and the navigator becomes modal. The motions are exactly what your fingers expect:

KeysMotion
h j k lMove left / down / up / right
g g / GJump to top / bottom
D / UPage down / page up
12jCounts work — down twelve rows in one go

The grid is two-dimensional, so we taught the motions about geometry: j and k move by row — following the real visual layout, date groups and all — while h and l step item by item. It moves the way your eyes move, not the way an array is indexed.

Then the part that makes it actually useful — operating on files:

KeysAction
y yYank (copy) the current file
d dCut the current file (paste it with p)
pPaste files you yanked or cut
vVisual mode — select a range, then act
/Search file names
\Search inside file contents

That last pair is the one we're quietly proud of. / is the filename search you'd expect. \ goes deeper and searches the contents of your files — the thing your OS search is supposed to do and somehow never does well. Two adjacent keys, two kinds of "find," both exactly where a Vim user's hand already is.

Vim doesn't stop at navigation

Selecting files is nice, but the moment you open one to edit it, most "Vim modes" evaporate and dump you back into a normal text box. Ours doesn't. The same keybindings carry straight into FileHop's source editors — Typst, Mermaid, JSON, and the rest. Open a file, and you're in normal mode, ready to cw a word or dd a line, no context switch.

Yes, even your Word documents

Here's the one that surprised even us. FileHop edits .docx files in a proper rich-text editor — and we gave that a full Vim implementation too. Not a toy. Real modal editing on top of a formatted document:

  • Modes: normal, insert, visual, and visual-line — with a block cursor in normal mode and a text cursor in insert, so you always know where you are.
  • Motions: h j k l, w b e, 0 and $, gg / G, page motions, and line-aware j/k that step across headings, paragraphs, and tables.
  • Operators: d, c, y with motions — dd, cc, yy — plus x, s, r, D, C.
  • Insert entry: i a I A o O, exactly as you'd reach for them.
  • Paste & undo: p / P, u to undo, Ctrlr to redo.

Editing a contract with cc and yanking a clause with yy, inside a Word file, in a file manager. We're not sure anyone asked for this. We're very sure some of you have wanted it for a decade.

A fair warning: Vim in the DOCX editor is still early. Rich, formatted documents are a much harder surface than a plain text buffer — tables, lists, and mixed formatting all complicate what a motion or an operator should do — so expect rough edges while we refine it. The source editors are further along; the Word-document side is the one we're actively polishing.

Editing a text file and a Word document with Vim keys — modes, motions, and cc / dd / yy on real content.

We kept it honest

A half-hearted Vim mode is worse than none — it lies to your fingers. So we sweated the details that make modal editing trustworthy:

  • A block cursor in normal and visual modes, a text cursor in insert — the universal "which mode am I in" signal.
  • A mode indicator so you're never guessing.
  • A dedicated, full-screen shortcuts modal — press ? and every motion and operator is listed, in context.

Vim mode is opt-in. Flip it on in Settings when you want it; leave it off and the arrow keys, Tab, and the rest of FileHop's shortcuts work exactly as before. Nobody gets ambushed by modal editing in their file browser.

What's not here yet

We'd rather ship a smaller Vim that's honest than a bigger one that lies, so a few things you'll reach for aren't wired up yet. The two we hear about most:

  • gt / gT to switch tabs — tab motions aren't supported yet, so for now use the standard tab shortcuts.
  • Ex commands like :wq — the : command line isn't in yet, so you can't :w to save or :wq to write-and-quit. Use the normal save and close shortcuts in the meantime.

Both are on the roadmap — they're exactly the kind of muscle memory we want to honor, and they're in the pipeline for an upcoming release.

Try it

Vim mode ships in FileHop 0.2.0, free for Mac and Windows. Turn it on in Settings, press ? to see the full map, and point hjkl at your actual files. If you want the wider picture of how the keyboard took over the whole app, read how shortcuts became first-class in FileHop — or jump to the Vim file manager guide for the complete keybinding reference.

Try it yourself

Everything in this post ships in FileHop 0.2.0. Free, offline, and yours — for Mac and Windows.