]> git.rmz.io Git - dotfiles.git/blobdiff - vimrc
line wrap options
[dotfiles.git] / vimrc
diff --git a/vimrc b/vimrc
index 55906d8426a671f054d5379dd11d25c07311af56..6a2047b18d90f4657835b9240be5aad4762dc616 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,16 @@ 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>
+
+" line wrap {{{1
+set backspace=indent,eol,start " allow backspacing over everything in insert mode
+set wrap                       " wrap lines
+set linebreak                  " do not wrap in the middle of a word
+set showbreak=▒▒               " show these chars for wrapped lines
 
 " NERDTree {{{1
 " open/close NERDTree with \e
@@ -52,7 +53,6 @@ endif
 set background=dark            " Dark background, d'uh!
 set number                     " show some linenumbers
 set showmatch                  " Show matching brackets.
-set showbreak=▒▒                  " show these chars for wrapped lines
 set list listchars=tab:»·,trail:· " show these chars for tabs and trailing spaces
 
 " misc options {{{1
@@ -64,7 +64,6 @@ set autowrite                  " Automatically save before commands like :next a
 "set hidden                    " Hide buffers when they are abandoned
 set splitright                 " split right when using :vsp
 set scrolloff=5                " keep at least n lines above/below
-set backspace=indent,eol,start " allow backspacing over everything in insert mode
 
 set viminfo='100,<50,s10,h,n~/.vim/viminfo " viminfo defaults but save file in .vim