Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Vim :set ignorecase command do not affect "f" and "t" motion commands in my vim config.

Is there any option or hack that makes this commands to ignore case?

share|improve this question

1 Answer 1

I would suggest something like:

function! ForwardLookup()
    " get next key pressed
    let c = nr2char(getchar())
    let old_search_pattern = @/
    " Use of \V enables very-nonmagic pattern
    exec 'normal /\c\V' . escape(c, '\/') . nr2char(0x0d)
    let @/ = old_search_pattern
endfunction
nnoremap f :call ForwardLookup()<CR>
share|improve this answer
1  
Not strong enough: don't support numeric prefix, goes over line break, no visual mode support. –  Bogdan Gusiev Jun 29 '11 at 19:47
    
This also doesn't support repeat f command by ; –  Thomson Jul 30 at 2:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.