# HG changeset patch # User Richard Cheng # Date 1334583503 -3600 # Node ID a8dd2fa6d24c1838cc198740849e5cb529322313 # Parent dd723c5dadcd193c61ca2677cfa29d78d530d383# Parent ee7e65e9658e25af8affe00eb58d087e8e55dd4f Merge remote-tracking branch 'upstream/master' diff -r ee7e65e9658e -r a8dd2fa6d24c chapters/05.markdown --- a/chapters/05.markdown Sun Apr 08 15:34:54 2012 -0400 +++ b/chapters/05.markdown Mon Apr 16 14:38:23 2012 +0100 @@ -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. diff -r ee7e65e9658e -r a8dd2fa6d24c chapters/08.markdown --- a/chapters/08.markdown Sun Apr 08 15:34:54 2012 -0400 +++ b/chapters/08.markdown Mon Apr 16 14:38:23 2012 +0100 @@ -89,7 +89,7 @@ Run this command: :::vim - :inoremap ssig --Steve Loshsteve@stevelosh.com + :inoremap ssig -- Steve Loshsteve@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 --Steve Loshsteve@stevelosh.com + :iabbrev ssig -- Steve Loshsteve@stevelosh.com Now try out the abbreviation again. diff -r ee7e65e9658e -r a8dd2fa6d24c chapters/09.markdown --- a/chapters/09.markdown Sun Apr 08 15:34:54 2012 -0400 +++ b/chapters/09.markdown Mon Apr 16 14:38:23 2012 +0100 @@ -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`. diff -r ee7e65e9658e -r a8dd2fa6d24c chapters/11.markdown --- a/chapters/11.markdown Sun Apr 08 15:34:54 2012 -0400 +++ b/chapters/11.markdown Mon Apr 16 14:38:23 2012 +0100 @@ -97,7 +97,7 @@ :nnoremap Q x :nnoremap Q dd -Now switch to file `foo` and 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. diff -r ee7e65e9658e -r a8dd2fa6d24c chapters/18.markdown --- a/chapters/18.markdown Sun Apr 08 15:34:54 2012 -0400 +++ b/chapters/18.markdown Mon Apr 16 14:38:23 2012 +0100 @@ -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