Browse files

fix discussion of buffer-local mappings

fixes #21
  • Loading branch information...
1 parent 461fef9 commit 69fdda94a78f865d734f5fe5829cf6a7b940cb4b @sjl committed Jun 16, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 chapters/11.markdown
@@ -32,11 +32,16 @@ Vim deletes the current line. Nothing surprising here either.
Now for the twist: while still in file `bar` type `<leader>x`.
-Nothing happened!
+Instead of deleting the entire line, Vim just deleted a single character!
+What happened?
The `<buffer>` in the second `nnoremap` command told Vim to only consider that
mapping when we're in the same buffer as where we defined it.
+When you typed `<leader>x` in file `bar` Vim couldn't find a mapping that
+matched it, so it treated it as two commands: `<leader>` (which does nothing on
+its own) and `x` (the normal command to delete a single character.)
Local Leader

0 comments on commit 69fdda9

Please sign in to comment.