0e78ce34b11d

Proof 29-31.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 19 Nov 2012 19:01:14 -0500
parents efff67c5b753
children d63fcc747071 2a59bd19907a 9bea09df95b2 0a6edc24c4c5 501a4a2cadce
branches/tags (none)
files chapters/29.markdown chapters/30.markdown chapters/31.markdown

Changes

--- a/chapters/29.markdown	Mon Nov 19 18:40:21 2012 -0500
+++ b/chapters/29.markdown	Mon Nov 19 19:01:14 2012 -0500
@@ -49,9 +49,9 @@
 
 This time Vim moves to the bottom of the file even though `G` has been mapped.
 
-When writing Vim scripts you should **always** use `normal!`, **never** plain
-old `normal`.  You can't trust what keys your users will have mapped in their
-`~/.vimrc` files.
+When writing Vim scripts you should **always** use `normal!`, and **never** use
+plain old `normal`.  You can't trust what keys your users will have mapped in
+their `~/.vimrc` files.
 
 Special Characters
 ------------------
@@ -67,10 +67,9 @@
 special character sequences like `<cr>`.
 
 In this case Vim thinks you wanted to search for the character sequence "f, o,
-o, left angle bracket, c, r, right angle bracket", and thinks that you never
-even pressed return to perform the search!
-
-We'll talk about how to get around this in the next chapter.
+o, left angle bracket, c, r, right angle bracket", and doesn't realize that you
+even pressed return to perform the search!  We'll talk about how to get around
+this in the next chapter.
 
 Exercises
 ---------
--- a/chapters/30.markdown	Mon Nov 19 18:40:21 2012 -0500
+++ b/chapters/30.markdown	Mon Nov 19 19:01:14 2012 -0500
@@ -2,7 +2,7 @@
 ===============
 
 Now that we've seen `execute` and `normal!` we can talk about a common Vimscript
-idiom.  Run the following command:
+idiom in more detail.  Run the following command:
 
     :::vim
     :execute "normal! gg/foo\<cr>dd"
@@ -24,8 +24,8 @@
 What does this do?  Let's break it apart:
 
 * `:execute "normal! ..."`: run the sequence of commands as if they were entered
-  in normal mode, ignoring all mappings, and replacing escape sequences with
-  their results.
+  in normal mode, ignoring all mappings, and replacing string escape sequences
+  with their results.
 * `mq`: store the current location in mark "q".
 * `A`: move to the end of the current line and enter insert mode after the last
   character.
--- a/chapters/31.markdown	Mon Nov 19 18:40:21 2012 -0500
+++ b/chapters/31.markdown	Mon Nov 19 19:01:14 2012 -0500
@@ -7,7 +7,7 @@
 
 Type the following text into a buffer:
 
-    :::python
+    :::text
     max = 10
 
     print "Starting"
@@ -17,11 +17,13 @@
 
     print "Done"
 
-This is the text we'll use to experiment with Vimscript's regex support.
+This is the text we'll use to experiment with Vimscript's regex support.  It
+happens to be Python code, but don't worry if you don't know Python.  It's just
+an example.
 
 I'm going to assume that you know the basics of regular expressions.  If you
-don't you should definitely stop reading this book and start reading [Learn
-Regex the Hard Way][regex] by Zed Shaw.  Come back when you're done with that.
+don't you should stop reading this book and start reading [Learn Regex the Hard
+Way][regex] by Zed Shaw.  Come back when you're done with that.
 
 [regex]: http://regex.learncodethehardway.org/
 
@@ -180,7 +182,7 @@
 Read `:help magic` carefully.
 
 Read `:help pattern-overview` to see the kinds of things Vim regexes support.
-Stop after the character classes.
+Stop reading after the character classes.
 
 Read `:help match`.  Try running the `:match Error /\v.../` command a few times
 by hand.