ee45fef4cd6b

Merge.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sat, 16 Jun 2012 16:10:29 -0400
parents 3e314e533b1d (current diff) 965a6874086b (diff)
children fa2312e930b1
branches/tags (none)
files chapters/09.markdown chapters/11.markdown chapters/21.markdown chapters/22.markdown chapters/25.markdown chapters/28.markdown chapters/32.markdown

Changes

--- a/chapters/05.markdown	Sat Jun 16 16:05:20 2012 -0400
+++ b/chapters/05.markdown	Sat Jun 16 16:10:29 2012 -0400
@@ -90,7 +90,7 @@
 character.
 
 Each of the `*map` commands has a `*noremap` counterpart that ignores other
-mappings: `nnoremap`, `vnoremap`, and `inoremap`.
+mappings: `noremap`, `nnoremap`, `vnoremap`, and `inoremap`.
 
 When to Use
 -----------
@@ -102,7 +102,7 @@
 
 **No, seriously, ALWAYS.**
 
-Using a bare `nmap` is just *asking* for pain down the road when you install
+Using a bare `*map` is just *asking* for pain down the road when you install
 a plugin or add a new custom mapping.  Save yourself the trouble and type the
 extra characters to make sure it never happens.
 
--- a/chapters/08.markdown	Sat Jun 16 16:05:20 2012 -0400
+++ b/chapters/08.markdown	Sat Jun 16 16:10:29 2012 -0400
@@ -89,7 +89,7 @@
 Run this command:
 
     :::vim
-    :inoremap ssig --<cr>Steve Losh<cr>steve@stevelosh.com
+    :inoremap ssig -- <cr>Steve Losh<cr>steve@stevelosh.com
 
 This is a *mapping* intended to let you insert your signature quickly.  Try it
 out by entering insert mode and typing `ssig`.
@@ -109,7 +109,7 @@
 
     :::vim
     :iunmap ssig
-    :iabbrev ssig --<cr>Steve Losh<cr>steve@stevelosh.com
+    :iabbrev ssig -- <cr>Steve Losh<cr>steve@stevelosh.com
 
 Now try out the abbreviation again.
 
--- a/chapters/09.markdown	Sat Jun 16 16:05:20 2012 -0400
+++ b/chapters/09.markdown	Sat Jun 16 16:10:29 2012 -0400
@@ -76,8 +76,8 @@
 instead of double quotes.
 
 Try using `vnoremap` to add a mapping that will wrap whatever text you have
-*visually selected* in quotes.  You'll probably need the `gv` command for this,
-so read up on it with `:help gv`.
+*visually selected* in quotes.  You'll probably need the ```<`` and ```>``
+commands for this, so read up on them with ``:help `<``.
 
 Map `H` in normal mode to go to the beginning of the current line.  Since `h`
 moves left you can think of `H` as a "stronger" `h`.
--- a/chapters/11.markdown	Sat Jun 16 16:05:20 2012 -0400
+++ b/chapters/11.markdown	Sat Jun 16 16:10:29 2012 -0400
@@ -97,7 +97,7 @@
     :nnoremap <buffer> Q x
     :nnoremap          Q dd
 
-Staying in file `foo`, type `Q`.  What happens?
+Now type `Q`.  What happens?
 
 When you press `Q`, Vim will run the first mapping, not the second, because the
 first mapping is *more specific* than the second.
--- a/chapters/18.markdown	Sat Jun 16 16:05:20 2012 -0400
+++ b/chapters/18.markdown	Sat Jun 16 16:10:29 2012 -0400
@@ -43,8 +43,8 @@
 
     :::vim
     augroup filetype_vim
-        au!
-        au FileType vim setlocal foldmethod=marker
+        autocmd!
+        autocmd FileType vim setlocal foldmethod=marker
     augroup END
 
 This will tell Vim to use the `marker` method of folding for any Vimscript
--- a/chapters/21.markdown	Sat Jun 16 16:05:20 2012 -0400
+++ b/chapters/21.markdown	Sat Jun 16 16:10:29 2012 -0400
@@ -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"
--- a/chapters/22.markdown	Sat Jun 16 16:05:20 2012 -0400
+++ b/chapters/22.markdown	Sat Jun 16 16:10:29 2012 -0400
@@ -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 noignorecase
@@ -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
--- a/chapters/23.markdown	Sat Jun 16 16:05:20 2012 -0400
+++ b/chapters/23.markdown	Sat Jun 16 16:10:29 2012 -0400
@@ -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()
--- a/chapters/25.markdown	Sat Jun 16 16:05:20 2012 -0400
+++ b/chapters/25.markdown	Sat Jun 16 16:10:29 2012 -0400
@@ -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
--- a/chapters/28.markdown	Sat Jun 16 16:05:20 2012 -0400
+++ b/chapters/28.markdown	Sat Jun 16 16:10:29 2012 -0400
@@ -12,7 +12,7 @@
 build commands out of arbitrary strings.
 
 Let's try a more useful example.  Prepare by opening a file in Vim, then using
-`:edit "foo.txt"` in the same window to open a new buffer.  Now run the
+`:edit foo.txt` in the same window to open a new buffer.  Now run the
 following command:
 
     :::vim
--- a/chapters/33.markdown	Sat Jun 16 16:05:20 2012 -0400
+++ b/chapters/33.markdown	Sat Jun 16 16:10:29 2012 -0400
@@ -22,8 +22,9 @@
 enough to warrant a file of its own.
 
 First, find your Vim `plugin` directory.  On Linux or OS X this will be at
-`~/.vim/plugin`.  If you're on Windows it will be at TODO.  If this directory
-doesn't exist, create it.
+`~/.vim/plugin`.  If you're on Windows it will be inside the `vimfiles`
+directory in your home directory. (Use the command: `:echo $HOME` in Vim if
+you're not sure where this is). If this directory doesn't exist, create it.
 
 Inside `plugin/` create a file named `grep-operator.vim`.  This is where you'll
 place the code for this new operator.  When you're editing the file you can run