On 6/10/06, Marc Weber <[EMAIL PROTECTED]> wrote:
Can you do 3f{ this way ?
Here is fixed version that handles counter properly.
Regarding f{, yes, it finds it properly.
(That why \V and check for (c=='\' is there)
" remap f,F to be multi-line. Supports counter before f,F.
" finds special chars properly. Yakov Lerner
noremap <silent>f :call OneCharSearch(1)<CR>
noremap <silent>F :call OneCharSearch(0)<cr>
noremap ; n
noremap , N
function! OneCharSearch(forward) range
" op is '/' or '?'
let x= getchar()
let c=nr2char(x)
echo 'c='.c
if x == 27 | return | endif
if c == '\' | let x='\\' | endif
let Count= (v:count==0 ? 1 : v:count)
if a:forward
silent! exe "norm ".Count."/\\V".c."\<cr>"
else
silent! exe "norm ".Count."?\\V'.c."\<cr>"
endif
endfun
Yakov