Vim For Everyone

Not just for coders.

Motivation for this site

Recently, there has been a lot of interest in personal note taking tools —
roam
,
workflowy
,
notion
,
evernote
, etc. This makes sense.
"For an autodidact, this is a golden age." - Arnold Kling
Anything that helps retain information and make connections is super valuable.
Vim — the free, 30 year old text editor popular among computer programmers — does this exceptionally well. But it's not widely known among non-coders.
Because Vim is viewed as a programming tool, the non-coding majority is missing out on extremely powerful software.
This site is meant as a Vim introduction and resource for non-coders.

Motivation for learning Vim

Most important:
working in Vim is really fast
.
It's not a coincidence that Vim users often put their feelings into gifs like these:
ok
ok
And speed matters. Ben Kuhn has a
great post
where he talks about how successful people are impatient and move
fast
. A surprising number mention typing speed.
"I also made an effort to learn to type really fast and the keyboard shortcuts that help with my workflow." — Sam Altman
In my estimation, going from typing
slow
->
fast
is a similar jump to going from typing
fast
->
Vim
.
Besides being really fast, Vim is also:
free
.
just a
text editor
; you're working with plain text files, which you own.
going to be
around a while
. It's existed in some form since 1976, (which means it has a 50% of lasting another 14-132 years, according to John Gott's
Copernicus method
).

Vim: a
modal
text editor

Vim is a
modal
text editor, which just means it has modes.

Insert mode

There's similar-to-Microsoft Word, typing into a regular textbox, what you see is what you get mode. This is
insert mode
.

Normal mode

Then there's move the cursor around, scroll, delete, copy, paste, indent etc mode. This is
normal mode
.

The
same keys
do
different things
depending on which mode you're in.

In insert mode, if you type the letter
j
four times you see this appear on the screen:
jjjj
In normal mode, you don't see anything. Instead your cursor moves down four lines. Need to move it back up? Press
k
. Left, right?
h
and
l
respectively.

Implications of modes

Modes mean moving around, copying, pasting, deleting, and moving around between files is all really easy and ergonomic to do, because you're doing them all with the same "home row" keys that are the easiest to reach.
Once you get used to working with modes and knowing which you're in, flying around the screen with minimal movement is trivial.

Other features

Modes are the defining feature of Vim, but it has other powers too.

Grammar

Vim has a
grammar
. Human languages like English aren't random or something we just memorize. They have subjects, verbs and adjectives that fit together in mostly predictable ways.
Same with Vim. There are
actions
, or things you can do to text:
delete
copy
make uppercase
highlight it
Then there are
subjects
(called
text objects
in Vim), which are the parts of the text itself:
the current line
the word my cursor is in
the paragraph my cursor is in
to the next 'g' character
the selected text
For example, the key for the delete action is
d
. The text object for
word my cursor is in
is
iw
. Therefore, to delete the word my cursor is in:
diw
You can easily modify the action, object or both. To delete the whole paragraph:
dip
.
The action for uppercase is
gU
. To turn the word my cursor is in to uppercase:
gUiw
.

Dot command

In normal mode, typing
.
repeats the last action you just did.
Example: say I used Vim's grammar to indent (
>
) the paragraph (
ip
) my cursor was in like this:
>ip
I can go to another paragraph, type
.
and that paragraph will be indented too. I can even type it more than once if I want to indent multiple levels.

Multiple views into the same file

Vim gives you multiple looks in the same file.
Say I'm typing up some extended notes in a long file and want to refer to something I've written higher up.
Instead of scrolling back and forth (which, because it's Vim, is only a couple of keystrokes), I can open a
split
to get two views of the same file. They're the same text — any changes I make in one split show up instantaneously in the other — but I can have one looking in on the top of the file so I can refer to my notes while I'm typing into the bottom.

Leader key

Your leader key is almost like another mode: press it, then another key, and Vim will do some action.
For example, my leader key is the spacebar.
In normal mode, I have it set up so that
<space>?
toggles spellcheck and pressing
<space>ki
opens a file where I keep a running list of notes on things my kids have been up to.

Plugins

There are many, many user built plugins in Vim that will help you do whatever you want. They're all free, and we'll use a lot of them in this guide.

Prerequisites

Be able to touch type well. A good handle on the top row of numbers helps.
Regular qwerty keyboard.
Not
a prerequisite: knowing or having any interest in programming.

A Non-Programmers Guide to Installing Vim

Is coming soon!

Tutorial

Might also be coming soon, although the purpose of this site is more to get non-coders intrigued by Vim than to be necessarily definitive source on learning how to use it.
Part of the issue is I personally learned it ~10 years ago and am not necessarily up to date on the quickest, easiest way to get it across. Will see what I can do though.

Plugins

More on plugins and a set up for non-coders is definitely coming soon!
Brought to you by
Nathan Braun