369014a3a038

Fix some mistakes in the Vim entry.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 20 Sep 2010 20:42:03 -0400
parents 21748aa456d4
children 78f99a087188
branches/tags (none)
files content/blog/2010/09/coming-home-to-vim.html

Changes

--- a/content/blog/2010/09/coming-home-to-vim.html	Mon Sep 20 18:17:20 2010 -0400
+++ b/content/blog/2010/09/coming-home-to-vim.html	Mon Sep 20 20:42:03 2010 -0400
@@ -368,7 +368,7 @@
     set incsearch
     set showmatch
     set hlsearch
-    nnoremap <leader><space> :let @/=''<cr>
+    nnoremap <leader><space> :noh<cr>
     nnoremap <tab> %
     vnoremap <tab> %
 
@@ -397,10 +397,6 @@
 `,<space>`. This gets rid of the distracting highlighting once I've found what
 I'm looking for.
 
-Some people use a mapping that turns search highlighting off and on, but
-I don't like that solution.  It means I have to remember to turn it back on
-later once I've probably already forgotten about the original search.
-
 The last two lines make the tab key match bracket pairs. I use this to move
 around all the time and `<tab>` is a hell of a lot easier to type than `%`.
 
@@ -519,7 +515,7 @@
 here's a `,S` mapping that sorts them for me:
 
     :::vim
-    nnoremap <leader>S ?{<CR>jV/^\s*\}?$<CR>k:sort<CR>:let @/=''<CR>
+    nnoremap <leader>S ?{<CR>jV/^\s*\}?$<CR>k:sort<CR>:noh<CR>
 
 This next mapping imitates TextMates `Ctrl+Q` function to re-hardwrap
 paragraphs of text:
@@ -822,7 +818,7 @@
 that has lots of nesting I simply hit `<leader>R` and get some color that helps
 me keep my place.
 
-[Rainbow Parentheses]: http://www.vim.org/scripts/script.php?script_id=1230
+[Rainbow Parentheses]: http://www.vim.org/scripts/script.php?script_id=1561
 [myRainbow]: http://bitbucket.org/sjl/dotfiles/src/tip/vim/bundle/rainbow/
 
 Things I Want