diff --git a/vim/.vimrc b/vim/.vimrc index 6e02ebc..bbedd71 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -74,6 +74,29 @@ set hlsearch set ignorecase set smartcase +" incsearch.vim +augroup incsearch-keymap + autocmd! + autocmd VimEnter * call s:incsearch_keymap() +augroup END +function! s:incsearch_keymap() + IncSearchNoreMap + IncSearchNoreMap +endfunction +let g:incsearch#auto_nohlsearch = 1 +let g:incsearch#consistent_n_direction = 1 +let g:incsearch#magic = '\v' +let g:incsearch#emacs_like_keymap = 1 +map / (incsearch-forward) +map ? (incsearch-backward) +map g/ (incsearch-stay) +map n (incsearch-nohl-n) +map N (incsearch-nohl-N) +map * (incsearch-nohl-*) +map # (incsearch-nohl-#) +map g* (incsearch-nohl-g*) +map g# (incsearch-nohl-g#) + " encoding set encoding=utf8 set fileencoding=utf8