1. Julian Rosse
  2. learnvimscriptthehardway

Commits

Julian Rosse  committed fcbfb7d

fixes

  • Participants
  • Parent commits 6baa30c
  • Branches default

Comments (0)

Files changed (9)

File chapters/07.markdown

View file
 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

File chapters/09.markdown

View file
 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`

File chapters/23.markdown

View file
     :::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.
 

File chapters/31.markdown

View file
 
 * 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".
 

File chapters/33.markdown

View file
 
     :::vim
     nnoremap <leader>g :set operatorfunc=GrepOperator<cr>g@
-    vnoremap <leader>g :<C-U>call GrepOperator(visualmode())<cr>
+    vnoremap <leader>g :<c-u>call GrepOperator(visualmode())<cr>
 
     function! GrepOperator(type)
         if a:type ==# 'v'
 
     :::vim
     nnoremap <leader>g :set operatorfunc=GrepOperator<cr>g@
-    vnoremap <leader>g :<C-U>call GrepOperator(visualmode())<cr>
+    vnoremap <leader>g :<c-u>call GrepOperator(visualmode())<cr>
 
     function! GrepOperator(type)
         if a:type ==# 'v'
 
     :::vim
     nnoremap <leader>g :set operatorfunc=GrepOperator<cr>g@
-    vnoremap <leader>g :<C-U>call GrepOperator(visualmode())<cr>
+    vnoremap <leader>g :<c-u>call GrepOperator(visualmode())<cr>
 
     function! GrepOperator(type)
         if a:type ==# 'v'

File chapters/34.markdown

View file
 
     :::vim
     nnoremap <leader>g :set operatorfunc=GrepOperator<cr>g@
-    vnoremap <leader>g :<C-U>call GrepOperator(visualmode())<cr>
+    vnoremap <leader>g :<c-u>call GrepOperator(visualmode())<cr>
 
     function! GrepOperator(type)
         let saved_unnamed_register = @@
 
     :::vim
     nnoremap <leader>g :set operatorfunc=<SID>GrepOperator<cr>g@
-    vnoremap <leader>g :<C-U>call <SID>GrepOperator(visualmode())<cr>
+    vnoremap <leader>g :<c-u>call <SID>GrepOperator(visualmode())<cr>
 
     function! s:GrepOperator(type)
         let saved_unnamed_register = @@

File chapters/43.markdown

View file
 
 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.
 

File chapters/44.markdown

View file
     :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.

File chapters/49.markdown

View file
         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.
 
         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: