Commits

Steve Losh committed 78f061a

Proof 0-2

  • Participants
  • Parent commits dc6a633

Comments (0)

Files changed (3)

File chapters/00.markdown

 
 To use this book you should have the latest version of Vim installed, which is
 version 7.3 at the time of this writing.  New versions of Vim are almost always
-backwards-compatible, so everything in this book should work just fine with
-anything after 7.3 too.
+backwards-compatible, so everything in this book should work fine with anything
+after 7.3 too.
 
-You should be comfortable editing files in Vim.
+Nothing in this book is specific to console Vim or GUI Vims like gVim or MacVim.
+You can use whichever you prefer.
 
-You should know basic Vim terminology like "buffer", "window", "normal mode",
-"insert mode" and "text object".
+You should be comfortable editing files in Vim.  You should know basic Vim
+terminology like "buffer", "window", "normal mode", "insert mode" and "text
+object".
 
-If you're not at that point yet go through the `vimtutor` program, use Vim
-exclusively for a month or two, and come back when you've got Vim burned into
-your fingers.
+If you're not at that point yet you should go through the `vimtutor` program,
+use Vim exclusively for a month or two, and come back when you've got Vim burned
+into your fingers.
 
-You should have some programming experience.  If you've never programmed before
-check out [Learn Python the Hard Way](http://learnpythonthehardway.org/) first
-and come back to this book when you're done.
+You'll also need to have some programming experience.  If you've never
+programmed before check out [Learn Python the Hard
+Way](http://learnpythonthehardway.org/) first and come back to this book when
+you're done.
 
 Creating a Vimrc File
 ---------------------
 
-If you already know what a vimrc file is and have one, go on to the next
+If you already know what a `~/.vimrc` file is and have one, go on to the next
 chapter.
 
-A vimrc file is a file you create that contains some Vimscript code.  Vim will
-automatically run the code inside this file every time you open Vim.
+A `~/.vimrc` file is a file you create that contains some Vimscript code.  Vim
+will automatically run the code inside this file every time you open Vim.
 
 On Linux and Mac OS X this file is located in your home directory and named
 `.vimrc`.

File chapters/01.markdown

 Echoing Messages
 ================
 
-The first piece of Vimscript we'll look at is `echom`.
+The first pieces of Vimscript we'll look at are the `echo` and `echom` commands.
 
-You can read the full documentation for the command by running `:help echom` in
-Vim.  As you go through this book you should try to read the `:help` for every
-new command you encounter to get a better understanding of how to use each one.
+You can read their full documentation by running `:help echo` and `:help echom`
+in Vim.  As you go through this book you should try to read the `:help` for
+every new command you encounter to learn more about them.
 
-Run the following command:
+Try out `echo` by running the following command:
 
     :::vim
     :echo "Hello, world!"
 
-You should see `Hello, world!` appear at the bottom of the window.
+You should see "Hello, world!" appear at the bottom of the window.
 
 Persistent Echoing
 ------------------
 
-Now run the following command:
+Now try out `echom` by running the following command.
 
     :::vim
     :echom "Hello again, world!"
 
-You should see `Hello again, world!` appear at the bottom of the window.
+You should see "Hello again, world!" appear at the bottom of the window.
 
-To see the difference between these two commands, run one more new command:
+To see the difference between these two commands, run the following:
 
     :::vim
     :messages
 
-You should see a list of messages.  `Hello, world!` will *not* be in this list,
-but `Hello again, world!` *will* be in it.
+You should see a list of messages.  "Hello, world!" will *not* be in this list,
+but "Hello again, world!" *will* be in it.
 
-When you're writing more complicated Vim scripts later in this book you may find
+When you're writing more complicated Vimscript later in this book you may find
 yourself wanting to "print some output" to help you debug problems.  Plain old
-`:echo`will print output, but it will often disappear by the time your script is
-done.  Using `:echom` will save the output and let you run `:messages` to view
-it later.
+`:echo` will print output, but it will often disappear by the time your script
+is done.  Using `:echom` will save the output and let you run `:messages` to
+view it later.
 
 Comments
 --------
 
-Before we move on we should mention comments.  When you write Vimscript code (in
-your `~/.vimrc` file or another one) you can add comments with the `"`
+Before moving, let's look at how to add comments.  When you write Vimscript code
+(in your `~/.vimrc` file or any other one) you can add comments with the `"`
 character, like this:
 
     :::vim
     nnoremap <space> za
 
 This doesn't *always* work (that's one of those ugly corners of Vimscript), but
-in most cases it does, and we'll talk about when it won't (and why that
+in most cases it does.  Later we'll talk about when it won't (and why that
 happens).
 
 Exercises
 
 Read `:help messages`.
 
-Add a line to your vimrc file that displays a friendly ASCII-art cat (`>^.^<`)
-whenever you open Vim.
+Add a line to your `~/.vimrc` file that displays a friendly ASCII-art cat
+(`>^.^<`) whenever you open Vim.

File chapters/02.markdown

 There are two main kinds of options: boolean options (either "on" or "off") and
 options that take a value.
 
+Boolean Options
+---------------
+
 Run the following command:
 
     :::vim
     :set number
 
-Line numbers should appear in Vim.  Now run this:
+Line numbers should appear on the left side of the window if they weren't there
+already.  Now run this:
 
     :::vim
     :set nonumber
 
-The line numbers should disappear.  `number` is a boolean option -- it can be
-off or on.  You turn it "on" by running `:set number` and "off" with `:set
+The line numbers should disappear.  `number` is a boolean option: it can be off
+or on.  You turn it "on" by running `:set number` and "off" with `:set
 nonumber`.
 
-Toggling Options
-----------------
+All boolean options work this way.  `:set <name>` turns the option on and `:set
+no<name>` turns it off.
+
+Toggling Boolean Options
+------------------------
 
 You can also "toggle" boolean options to set them to the *opposite* of whatever
 they are now.  Run this:
     :set nonumber
     :set number?
 
-Notice how the first `:set number?` command displayed `number` while the second
-displayed `nonumber`.
+Notice how the first `:set number?` command displayed "number" while the second
+displayed "nonumber".
 
 Options with Values
 -------------------
     :set numberwidth?
 
 The `numberwidth` option changes how wide the column containing line numbers
-will be.
+will be.  You can change non-boolean options with `:set <name>=<value>`, and
+check them the usual way (`:set <name>?`).
 
 Try checking what a few other common options are set to:
 
 Setting Multiple Options at Once
 --------------------------------
 
-Finally, you can specify more than one option in the same `:set` command.  Try
-running this:
+Finally, you can specify more than one option in the same `:set` command to save
+on some typing.  Try running this:
 
     :::vim
+    :set numberwidth=2
+    :set nonumber
     :set number numberwidth=6
 
+Notice how both options were set and took effect in the last command.
+
 Exercises
 ---------
 
-Read `:help 'number'` (note the quotes).
+Read `:help 'number'` (notice the quotes).
 
 Read `:help relativenumber`.
 
 
 Read `:help matchtime`.
 
-Add a few lines to your vimrc file to set these options however you like.
+Add a few lines to your `~/.vimrc` file to set these options however you like.