# HG changeset patch # User Julian Rosse # Date 1348384708 14400 # Node ID fcbfb7d9277061002f8279cd50087deaf53a023b # Parent 6baa30c3b7d351046f28146e5ee872150b0a7ed9 fixes diff -r 6baa30c3b7d3 -r fcbfb7d92770 chapters/07.markdown --- a/chapters/07.markdown Sat Sep 08 13:45:55 2012 -0400 +++ b/chapters/07.markdown Sun Sep 23 03:18:28 2012 -0400 @@ -1,7 +1,7 @@ Editing Your Vimrc ================== -Before we move on to learning more Vimscript lets find a way to make it easier +Before we move on to learning more Vimscript let's find a way to make it easier to add new mappings to our `~/.vimrc` file. When you're coding away furiously at a problem and realize a new mapping would diff -r 6baa30c3b7d3 -r fcbfb7d92770 chapters/09.markdown --- a/chapters/09.markdown Sat Sep 08 13:45:55 2012 -0400 +++ b/chapters/09.markdown Sun Sep 23 03:18:28 2012 -0400 @@ -76,7 +76,7 @@ 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 ```<`` and ```>`` +*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` diff -r 6baa30c3b7d3 -r fcbfb7d92770 chapters/23.markdown --- a/chapters/23.markdown Sat Sep 08 13:45:55 2012 -0400 +++ b/chapters/23.markdown Sun Sep 23 03:18:28 2012 -0400 @@ -9,7 +9,7 @@ :::vim :function meow() -You might think this would start defining a function named `Meow`. +You might think this would start defining a function named `meow`. Unfortunately this is not the case, and we've already run into one of Vimscript's quirks. diff -r 6baa30c3b7d3 -r fcbfb7d92770 chapters/31.markdown --- a/chapters/31.markdown Sat Sep 08 13:45:55 2012 -0400 +++ b/chapters/31.markdown Sun Sep 23 03:18:28 2012 -0400 @@ -104,7 +104,7 @@ * First, `execute` takes a String, so the double backslashes we used turn into single backslashes by the time they get to `normal!`. -* Vim, has *four* different "modes" of parsing regular expressions! The default +* Vim has *four* different "modes" of parsing regular expressions! The default mode requires a backslash before the `+` character to make it mean "1 or more of the preceding character" instead of "a literal plus sign". diff -r 6baa30c3b7d3 -r fcbfb7d92770 chapters/33.markdown --- a/chapters/33.markdown Sat Sep 08 13:45:55 2012 -0400 +++ b/chapters/33.markdown Sun Sep 23 03:18:28 2012 -0400 @@ -128,7 +128,7 @@ :::vim nnoremap g :set operatorfunc=GrepOperatorg@ - vnoremap g :call GrepOperator(visualmode()) + vnoremap g :call GrepOperator(visualmode()) function! GrepOperator(type) if a:type ==# 'v' @@ -191,7 +191,7 @@ :::vim nnoremap g :set operatorfunc=GrepOperatorg@ - vnoremap g :call GrepOperator(visualmode()) + vnoremap g :call GrepOperator(visualmode()) function! GrepOperator(type) if a:type ==# 'v' @@ -217,7 +217,7 @@ :::vim nnoremap g :set operatorfunc=GrepOperatorg@ - vnoremap g :call GrepOperator(visualmode()) + vnoremap g :call GrepOperator(visualmode()) function! GrepOperator(type) if a:type ==# 'v' diff -r 6baa30c3b7d3 -r fcbfb7d92770 chapters/34.markdown --- a/chapters/34.markdown Sat Sep 08 13:45:55 2012 -0400 +++ b/chapters/34.markdown Sun Sep 23 03:18:28 2012 -0400 @@ -18,7 +18,7 @@ :::vim nnoremap g :set operatorfunc=GrepOperatorg@ - vnoremap g :call GrepOperator(visualmode()) + vnoremap g :call GrepOperator(visualmode()) function! GrepOperator(type) let saved_unnamed_register = @@ @@ -60,7 +60,7 @@ :::vim nnoremap g :set operatorfunc=GrepOperatorg@ - vnoremap g :call GrepOperator(visualmode()) + vnoremap g :call GrepOperator(visualmode()) function! s:GrepOperator(type) let saved_unnamed_register = @@ diff -r 6baa30c3b7d3 -r fcbfb7d92770 chapters/43.markdown --- a/chapters/43.markdown Sat Sep 08 13:45:55 2012 -0400 +++ b/chapters/43.markdown Sun Sep 23 03:18:28 2012 -0400 @@ -112,7 +112,7 @@ Create a Mercurial or Git repository for your plugin, called `potion`. You can put it anywhere you like and symlink it into `~/.vim/bundle/potion/` or just put -it directory in `~/.vim/bundle/potion/`. +it directly in `~/.vim/bundle/potion/`. Create `README` and `LICENSE` files in the repository and commit them. diff -r 6baa30c3b7d3 -r fcbfb7d92770 chapters/44.markdown --- a/chapters/44.markdown Sat Sep 08 13:45:55 2012 -0400 +++ b/chapters/44.markdown Sun Sep 23 03:18:28 2012 -0400 @@ -72,8 +72,8 @@ :set filetype? This time Vim displays `filetype=potion`. When Vim started up it loaded the -autocommand group inside `~/.vim/bundle/potion.vim`, and when it opened -`factorial.pn` the autocommand fired, setting the `filetype` to `potion`. +autocommand group inside `~/.vim/bundle/potion/ftdetect/potion.vim`, and when it +opened `factorial.pn` the autocommand fired, setting the `filetype` to `potion`. Now that we've taught Vim to recognize Potion files we can move on to actually creating some useful behavior in our plugin. diff -r 6baa30c3b7d3 -r fcbfb7d92770 chapters/49.markdown --- a/chapters/49.markdown Sat Sep 08 13:45:55 2012 -0400 +++ b/chapters/49.markdown Sun Sep 23 03:18:28 2012 -0400 @@ -514,7 +514,7 @@ d 1 e 0 -You could, of course, combine these two cases with `&&`, but I prefer to keep +You could, of course, combine these two cases with `||`, but I prefer to keep them separate to make it more explicit. You might feel differently. It's a style issue. @@ -658,7 +658,7 @@ i string print 1 '! is: ' print 1 factorial (i) string print 1 - "\n" print. 1 + "\n" print. The same thing happens when the next line's indentation is *less* than the current line's: