Skip to content
Permalink
Browse files

Fix omap for c operator

Close #4
  • Loading branch information...
junegunn committed Jan 18, 2017
1 parent fd51211 commit 5e9d77b6375ad3f24e9208fa7bd7dd0b1d1a0cc0
Showing with 10 additions and 0 deletions.
  1. +10 −0 plugin/slash.vim
@@ -54,13 +54,23 @@ function! s:trailer()
return seq . after
endfunction

function! s:trailer_on_leave()
augroup slash
autocmd!
autocmd InsertLeave * call <sid>trailer()
augroup END
return ''
endfunction

function! s:escape(backward)
return '\V'.substitute(escape(@", '\' . (a:backward ? '?' : '/')), "\n", '\\n', 'g')
endfunction

map <expr> <plug>(slash-trailer) <sid>trailer()
imap <expr> <plug>(slash-trailer) <sid>trailer_on_leave()
cnoremap <plug>(slash-cr) <cr>
noremap <plug>(slash-prev) <c-o>
inoremap <plug>(slash-prev) <nop>

cmap <expr> <cr> <sid>wrap("\<cr>")
map <expr> n <sid>wrap('n')

0 comments on commit 5e9d77b

Please sign in to comment.
You can’t perform that action at this time.