Solved! How to Exit Vim "Ex" Mode

How does one exit Vim “Ex” mode? But first… how did you even get into “Ex” mode? ...

April 6, 2022 · 1 min · Jake Worth

Autoformat Your Code

Auto-formatting code is good, and you should be doing it all the time. Why? It helps you write better code in real-time, preempt trivial discussions, and maybe even democratize programming. ...

March 10, 2022 · 2 min · Jake Worth

Why Vim

I’ve been using, teaching, and stanning Vim since almost the beginning of my programming career. Yet, when asked to explain this preference, I stumble. In this post, I’d like to explore why I love Vim. ...

February 23, 2022 · 2 min · Jake Worth

Refining Your Terminal Aliases

Any command you type out manually, or even tab-complete a few times, can be shortened. A common shortening technique is the terminal alias. Here are some tips that help me write better aliases and cut my terminal keystrokes. ...

February 10, 2022 · 3 min · Jake Worth

Jump to N Percent of a File

From normal mode, N% will jump you to that percentage of the file. So 50% jumps to halfway through the file.

January 23, 2022 · 1 min · Jake Worth

Man pages in Vim

Hit K on a keyword, and Vim looks up the program under the keyword. It’s a bit jarring because Vim appears to shell out from your buffer to show the definition. To see that man page in Vim, load the man.vim plugin from command mode or in your .vimrc: :runtime! ftplugin/man.vim Now, you can read man pages as a Vim buffer: :Man curl

November 11, 2021 · 1 min · Jake Worth

How to Organize JavaScript Imports

The import statements at the top of a JavaScript component file can be a confusing, duplicative, churning mess. Is there a way to organize them that makes sense and scales? In this post, I’d like to share the way I handle this detail. ...

August 30, 2021 · 2 min · Jake Worth

Override Vim's Filetype

Vim’s filetype auto-detection is great for effortless syntax highlighting, but what if a certain kind of file (i.e. Ruby) contains lots of another kind of code (i.e. SQL)? The Ruby code will be highlighted and readable, the SQL a large monochrome blob. Hard to read and reason about. We can do better! Override the automatic assignment with: :set ft=sql This command with no assignment returns the current setting: :set ft filetype=lua We can easily revert to the auto-detected extension as needed. ...

April 22, 2021 · 1 min · Jake Worth

My Annotated Vim Configuration File

I love Vim. Folks who’ve programmed with me, or attended a Vim Meetup when I was an organizer, can attest. When I was learning to code, getting fast at Vim changed everything for me. After almost a decade using this editor, here are my personal configurations. ...

November 26, 2020 · 6 min · Jake Worth

Vim Nonrecursive Mappings

My first PR to a new Vim plugin was merged this week, check it out, adding non-recursive Vim mappings to vim-termbux. ...

December 17, 2016 · 1 min · Jake Worth