8a753b8685fa

Proof 27-31.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 03 Apr 2013 21:57:57 -0400
parents f09f87e10570
children 5868e6263612
branches/tags (none)
files chapters/27.markdown chapters/29.markdown chapters/30.markdown chapters/31.markdown

Changes

--- a/chapters/27.markdown	Wed Apr 03 21:53:35 2013 -0400
+++ b/chapters/27.markdown	Wed Apr 03 21:57:57 2013 -0400
@@ -12,13 +12,13 @@
     :::vim
     :echom strlen("foo")
 
-Vim displays "3", which is the length of the string "foo".  Now try the
+Vim displays `3`, which is the length of the string `"foo"`.  Now try the
 following command:
 
     :::vim
     :echom len("foo")
 
-Vim once again displays "3".  When used with Strings `len` and `strlen` have
+Vim once again displays `3`.  When used with Strings `len` and `strlen` have
 identical effects.  We'll come back to `len` later in the book.
 
 Splitting
@@ -52,14 +52,14 @@
     :::vim
     :echo join(["foo", "bar"], "...")
 
-Vim will display "foo...bar".  Don't worry about the list syntax for now.
+Vim will display `foo...bar`.  Don't worry about the list syntax for now.
 
 `split` and `join` can be paired to great effect.  Run the following command:
 
     :::vim
     :echo join(split("foo bar"), ";")
 
-Vim displays "foo;bar".  First we split the string "foo bar" into a list, then
+Vim displays `foo;bar`.  First we split the string `"foo bar"` into a list, then
 we joined that list together using a semicolon as the separator.
 
 Lower and Upper Case
@@ -72,7 +72,7 @@
     :echom tolower("Foo")
     :echom toupper("Foo")
 
-Vim displays "foo" and "FOO".  This should be pretty easy to understand.
+Vim displays `foo` and `FOO`.  This should be pretty easy to understand.
 
 In many languages (like Python) a common idiom is to force strings to lowercase
 before comparing them to perform a case-insensitive comparison.  In Vimscript
--- a/chapters/29.markdown	Wed Apr 03 21:53:35 2013 -0400
+++ b/chapters/29.markdown	Wed Apr 03 21:57:57 2013 -0400
@@ -62,7 +62,7 @@
     :::vim
     :normal! /foo<cr>
 
-At first glance it may seem like this should perform a search for "foo", but
+At first glance it may seem like this should perform a search for `foo`, but
 you'll see that it doesn't work.  The problem is that `normal!` doesn't parse
 special character sequences like `<cr>`.
 
--- a/chapters/30.markdown	Wed Apr 03 21:53:35 2013 -0400
+++ b/chapters/30.markdown	Wed Apr 03 21:57:57 2013 -0400
@@ -7,7 +7,7 @@
     :::vim
     :execute "normal! gg/foo\<cr>dd"
 
-This will move to the top of the file, search for the first occurrence of "foo",
+This will move to the top of the file, search for the first occurrence of `foo`,
 and delete the line that contains it.
 
 Previously we tried to use `normal!` with a search command but couldn't enter
--- a/chapters/31.markdown	Wed Apr 03 21:53:35 2013 -0400
+++ b/chapters/31.markdown	Wed Apr 03 21:57:57 2013 -0400
@@ -49,7 +49,7 @@
     /print
 
 As you type in each letter, Vim will start highlighting them in the first line.
-When you press return to execute the search *all* the instances of "print" will
+When you press return to execute the search *all* the instances of `print` will
 be highlighted and your cursor will be moved to the next match.
 
 Now try running the following command:
@@ -57,7 +57,7 @@
     :::vim
     :execute "normal! gg/print\<cr>"
 
-This will go to the top of the file and perform a search for "print", putting us
+This will go to the top of the file and perform a search for `print`, putting us
 at the first match.  It does this using `:execute "normal! ..."` which we saw in
 the previous chapter.
 
@@ -67,7 +67,7 @@
     :::vim
     :execute "normal! gg/print\<cr>n"
 
-Vim will put the cursor on the second "print" in the buffer (and all the matches
+Vim will put the cursor on the second `print` in the buffer (and all the matches
 will be highlighted).
 
 Let's try going in the opposite direction.  Run this command: