After experimenting with Vim on and off throughout my career, I finally decided last year to go all-in with Vim bindings across my entire development environment: IntelliJ, VSCode, Jupyter Notebooks, and even ZSH. The initial couple of weeks were admittedly challenging, with a noticeable dip in productivity. However, the investment quickly paid off. Not only has my code editing speed surpassed my previous efficiency, but it's also become more enjoyable. There's something uniquely satisfying about using the "." command or executing a macro that never fails to bring a smile to my face.
Intellij is my primary IDE and while it already has pretty good Vim integration via the IdeaVim plugin, I identified a few missing features that could enhance the experience further. This led me to develop several IntelliJ plugins, which I'm excited to share with you.
Peekaboo: Displaying Register Contents
The first plugin I developed is Peekaboo, inspired by the popular vim-peekaboo plugin.
Vim registers are powerful but can be difficult to keep track of. Peekaboo
solves this by showing register contents in a convenient popup window when you
press "
in normal mode or Ctrl-R
in insert mode. It's particularly helpful
when you need to recall what you've previously yanked or want to access a
specific named register.
The plugin organizes registers into logical sections - special registers, named registers, last yank, and delete/change history - making it easier to find exactly what you need. It's also smart enough to work with custom key mappings, seamlessly integrating with your existing Vim workflow.
Switch: Cycling Through Related Text Segments
Switch is a plugin
designed to make quick text alternations more efficient. It provides quick and
convenient transformations between true
and false
, visibility modifiers,
HTTP methods, and any other arbitrary lists of related text snippets.
What sets Switch apart is its extensive built-in pattern support across multiple languages. It includes patterns for basic operations (like toggling quotes or boolean values), language-specific switches (Java assertions, JavaScript function syntax, Ruby hash styles), and even Markdown task items. You can also define custom patterns to match your specific needs.
This extension is originally inspired by the switch.vim plugin.
FunctionTextObj: Easier Function Manipulation
The final plugin is FunctionTextObj.
It adds something I've always wanted in Vim: dedicated text objects for working
with functions. Just as w
operates on words, p
on paragraphs, or "
with
quoted strings, FunctionTextObj introduces if
(inner function) and af
(
around function) operators.
With these text objects, you can perform operations on functions using familiar
Vim commands. For example, dif
deletes a function body, while caf
changes an
entire function including its signature. The plugin works with various
programming languages supported by JetBrains' language plugins.
Conclusion
Building these plugins has not only improved my development workflow but also deepened my appreciation for Vim's extensibility. Whether you're switching between related terms, peeking at register contents, or manipulating functions, these tools aim to make your IdeaVim experience more productive and enjoyable.
The plugins are available on the JetBrains Marketplace, and I encourage you to
try them out. Each one can be easily installed through IntelliJ's plugin manager
and activated with a simple setting in your .ideavimrc
file.