]> git.rmz.io Git - dotfiles.git/blobdiff - vimrc
displaying number of matches + remap nohl
[dotfiles.git] / vimrc
diff --git a/vimrc b/vimrc
index 55906d8426a671f054d5379dd11d25c07311af56..24f13b305d1f99d8e080fd937ebfd5919da758c1 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -1,16 +1,8 @@
 " My vimrc file.
 "
-" Maintainer:   Samir Benmendil <samir.benmendil[at]gmail[dot]com>
+" Author:   Samir Benmendil <samir.benmendil[at]gmail[dot]com>
 "
 
-if v:progname =~? "evim"
-  finish
-endif
-
-" Use Vim settings, rather than Vi settings (much better!).
-" This must be first, because it changes other options as a side effect.
-set nocompatible
-
 " pathogen.vim runtime path manipulation
 silent! call pathogen#infect()
 
@@ -19,7 +11,10 @@ set incsearch
 set ignorecase
 set smartcase
 set hlsearch
-nmap <Leader>q :nohl<CR>
+" use leader-n to unhighlight search
+nmap <silent> <Leader>n :silent nohl<CR>
+" use leader-# to display the number of matches for the last search
+nmap <Leader># :%s:<C-R>/::gn<CR>
 
 " NERDTree {{{1
 " open/close NERDTree with \e