Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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
nnoremap f :call ForwardLookup()<CR>
share|improve this answer
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 '14 at 2:00

Your Answer


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.