[Question]
  [
The book Green Eggs and Ham by Dr. Seuss is famous for only having 50 different words in the entire story of the book.
Your task is to create a sequence of keystrokes that will result in the entire text of Green Eggs and Ham when applied to an empty file in the [vim](http://www.vim.org/) text editor, starting in normal mode with all default settings. Your keystrokes must not load any other files as part of their operation - all text must be generated within the editor itself.
Your final buffer must look exactly like [this file](http://pastebin.com/MRRpGXYx), although it can remain in whichever mode it ends up being in (you don't have to have a final `<Esc>` to return it to normal mode).
Chorded keystrokes like `<C-o>` or using Shift to type a capital letter count as a single keystroke.
The sequence of the fewest keystrokes to achieve this goal wins.
  
[Answer]
## 1864 keystrokes
Somebody could probably write some code that produces a more optimal solution, but this beats the reference case for now. This is a damn mess, and I am ashamed I did it by hand.
First, we enter insert mode.
```
i
```
Then all this
```
That ]! That ]!
IDNlike that ]!
Do Y like$?
|;].
IDNlike$.
WPY LTB or tB?
IZ LTB or tB.
IZ LTanywB.
IDNlike$.
|;].
WPY LTin a h@?
WPY LT=a m@?
|in a h@.
|=a m@.
|B or tB.
|.
IDNlike$.
|;].
WPY ETin a box?
WPY ET=a fox?
Not_a box. Not =a fox.
Not_a h@. Not =a m@.
IZ ETB or tB.
IZ ETanywB.
IZ eat$.
|;].
WPY? CPY? In a car?
Eat them! Eat them! B they are.
IZ,X,_a car.
You may LT. You will see.
You may LTin a tree!
IZ,X_a tree.
Not_a car! You let me be.
|in a box.
|=a fox.
|in a h@.
|=a m@.
|B or tB.
|.
IDNlike$.
|;].
AQ! AQ! AQ! AQ!
CPY;wPY;on aQ?
Not_aQ! Not_a tree!
Not_a car! Sam! Let me be!
IZ,X,_a box.
IX,Z;=a fox.
:=a m@.
:in a h@.
:B or tB.
:anywB.
IDNlike$.
|;].
Say! In +? B_+!
WPY;cPY,_+?
IZ,X,_+.
WPY;cPY,_the rain?
IZ,X,_the rain.
Not_+. Not on aQ.
Not_a car. Not_a tree.
|;Sam;Y see.
Not_a h@. Not_a box.
Not =a m@. Not =a fox.
:B or tB.
|!
You do not like$?
|;].
CPY;wPY;=a g^?
IZ,X;=a g^!
WPY;cPY;on a b^?
IX,Z;on a b^.
IWN,WN;=a g^.
:in the rain.
:on aQ.
Not_+! Not_a tree!
Not_a car! You let me be!
|in a box.
|=a fox.
:in a h@.
|=a m@.
|B or tB.
|!
IDNlike$!
|;].
You do not LT. So Y say.
Try them! Try them! & Y may.
Try them and Y may;I say.
Sam! If Y will let me be,
I will try them. You will see.
Say! I like$!
I do! I LT;]!
& I wPETin a b^.
& I wPET=a g^.
!ETin the rain.
&_+. & on aQ.
&_a car. &_a tree.
They are so good;so good;Y see!
So I will ETin a box.
!ET=a fox.
!ETin a h@.
!ET=a m@.
!ETB and tB.
Say! I will ETanywB!
I do so like$!
Thank Y! Thank Y;]!
```
Hit escape to enter command mode. And unravel the compressed stuff. Order matters, as I've compressed some compressed text.
```
<Esc>
%s/|/|anywB/g
%s/:/IWNET/g
%s/|/IDNLT/g
%s/Z/ wPnot/g
%s/X/ cPnot/g
%s/&/And/g
%s/+/the dark/g
%s/@/ouse/g
%s/^/oat/g
%s/Y/you/g
%s/IDN/I do not /g
%s/LT/like them /g
%s/]/Sam-I-am/g
%s/ET/eat them /g
%s/WN/ will not/g
%s/$/ green eggs and ham/g
%s/P/ould /g
%s/!/And I will /g
%s/Q/ train/g
%s/B/here/g
%s/_/ in /g
%s/=/with /g
%s/;/, /g
```
[Answer]
# 3,470 keystrokes
```
i<entire text of file>
```
The text file is 3,469 characters long, so typing "i" to put it in insert mode and typing out each character individually will take 3,470 keystrokes.
]