# HG changeset patch # User Richard Cheng # Date 1334586230 -3600 # Node ID 751620ce9fae7010cbb6f4a20756ec6176176232 # Parent b9e0500a6e02ae53b3d9b51ce1a71f8737b476ff Fix pluralisation/punctuation of "command(s)" diff -r b9e0500a6e02 -r 751620ce9fae chapters/21.markdown --- a/chapters/21.markdown Mon Apr 16 14:41:50 2012 +0100 +++ b/chapters/21.markdown Mon Apr 16 15:23:50 2012 +0100 @@ -45,8 +45,8 @@ : echom "ONE" :endif -Vim will display "ONE", because the integer `1` is "truthy". Now try this -command: +Vim will display "ONE", because the integer `1` is "truthy". Now try these +commands: :::vim :if 0 @@ -54,7 +54,7 @@ :endif Vim will *not* display "ZERO" because the integer `0` is "falsy". Let's see how -strings behave. Run this command: +strings behave. Run these commands: :::vim :if "something" @@ -64,7 +64,7 @@ The results may surprise you. Vim does *not* necessarily treat a non-empty string as "truthy", so it will not display anything! -Let's dive a bit further down the rabbit hole. Run this command: +Let's dive a bit further down the rabbit hole. Run these commands: :::vim :if "9024" diff -r b9e0500a6e02 -r 751620ce9fae chapters/22.markdown --- a/chapters/22.markdown Mon Apr 16 14:41:50 2012 +0100 +++ b/chapters/22.markdown Mon Apr 16 15:23:50 2012 +0100 @@ -5,14 +5,14 @@ compare things. Of course Vim lets us compare values, but it's not as straightforward as it may seem. -Run the following command: +Run the following commands: :::vim :if 10 > 1 : echom "foo" :endif -Vim will, of course, display "foo". Now run this command: +Vim will, of course, display "foo". Now run these commands: :::vim :if 10 > 2001 @@ -20,7 +20,7 @@ :endif Vim displays nothing, because `10` is not greater than `2001`. So far -everything works as expected. Run this command: +everything works as expected. Run these commands: :::vim :if 10 == 11 @@ -30,7 +30,7 @@ :endif Vim displays "second". Nothing surprising here. Let's try comparing strings. -Run this command: +Run these commands: :::vim :if "foo" == "bar" @@ -87,7 +87,7 @@ So how can you get around this ridiculousness? It turns out that Vim has *two extra sets* of comparison operators to deal with this. -Run the following command: +Run the following commands: :::vim :set ignorecase @@ -98,7 +98,7 @@ :endif Vim displays "first" because `==?` is the "case-insensitive no matter what the -user has set" comparison operator. Now run the following command: +user has set" comparison operator. Now run the following commands: :::vim :set ignorecase diff -r b9e0500a6e02 -r 751620ce9fae chapters/23.markdown --- a/chapters/23.markdown Mon Apr 16 14:41:50 2012 +0100 +++ b/chapters/23.markdown Mon Apr 16 15:23:50 2012 +0100 @@ -4,7 +4,7 @@ Like most programming languages, Vimscript has functions. Let's take a look at how to create them, and then talk about some of their quirks. -Run the following commands: +Run the following command: :::vim :function meow() diff -r b9e0500a6e02 -r 751620ce9fae chapters/25.markdown --- a/chapters/25.markdown Mon Apr 16 14:41:50 2012 +0100 +++ b/chapters/25.markdown Mon Apr 16 15:23:50 2012 +0100 @@ -10,7 +10,7 @@ Number Formats -------------- -You can specify Numbers in a few different ways. Run the following command. +You can specify Numbers in a few different ways. Run the following command: :::vim :echom 100