Skip to content

Instantly share code, notes, and snippets.

@pocke
Last active August 29, 2015 14:09
Show Gist options
  • Save pocke/0de2a084ca594fd40943 to your computer and use it in GitHub Desktop.
Save pocke/0de2a084ca594fd40943 to your computer and use it in GitHub Desktop.
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#begin(expand('~/.vim/bundle/'))
NeoBundle 'haya14busa/incsearch.vim'
call neobundle#end()
filetype plugin indent on " Required!
map / <Plug>(incsearch-forward)
syntax enable
cnoremap <CR> <C-\>e Cr()<CR><CR>
function! Cr()
return getcmdline()
endfunction
@pocke
Copy link
Author

pocke commented Nov 19, 2014

再現手順

vimrcを適用した状態で、/hoge<CR>など適当な単語を検索しようとしてEnterを押すと、E486: Pattern not found: hoge<C-\>e Cr()と言われる(mapしている文字列が検索にくっつく)

Cr()の中はなんでもよさそうです。ただ、getcmdline()しておかないとコマンドラインが使い物にならなくなってつらぽよです。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment