]> git.mdlowis.com Git - archive/vim_config.git/commitdiff
Tweak searching and search highlighting and use the X clipboard on linux
authorMike D. Lowis <mike.lowis@gentex.com>
Tue, 14 Apr 2015 19:01:47 +0000 (15:01 -0400)
committerMike D. Lowis <mike.lowis@gentex.com>
Tue, 14 Apr 2015 19:01:47 +0000 (15:01 -0400)
vimrc

diff --git a/vimrc b/vimrc
index 90dfd8fa24e910ce508b7de129e0fd8f46038a3a..d9ade8f424a03f1d1f033c3aca63f8df1f45a5a4 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -30,7 +30,7 @@ set mat=2                            " How long to blink matching braces for
 set visualbell t_vb=                 " Turn off visual and error bells
 set noerrorbells                     " Turn off auditory bells
 set hid                              " Change buffer without saving
-set clipboard=unnamed                " Yank and Put commands use the system clipboard
+set clipboard=unnamedplus            " Yank and Put commands use the system clipboard
 set laststatus=2                     " Turn on the status line always
 set undodir=$VIMHOME/undo            " Set directory for storing undo files
 set undofile                         " Turn on persistent undo
@@ -202,11 +202,19 @@ vnoremap < <gv
 vnoremap > >gv
 
 " ---- Clear Search Highlighting ----
-map <Leader>h :nohl<CR>
+map <Leader>h :set hlsearch!<CR>
+
+" ---- Re-Enable search highlighting for new searches ----
+noremap * :set hlsearch<CR>:nohlsearch<CR>*
+noremap / :set hlsearch<CR>:nohlsearch<CR>/
+noremap ? :set hlsearch<CR>:nohlsearch<CR>?
 
 " ---- Toggle Spell  Checking ----
 map <Leader>s :set spell!<CR>
 
+" ---- Clear Search Highlighting ----
+map <Leader>n :set number!<CR>
+
 " ---- Omni Complete ----
 inoremap <C-Space> <C-n>