Case insensitive key in vim?

Does anyone know how to get the "f" key in normal vim command mode for case insensitive operation

Example

function! OpenCurrentFileInMarked() 

In the above line, if I am at the beginning of the line, I want to be able to type 'fi'and get the first' me 'and then'; 'to switch to the capital "I" in the middle of the function name. I would prefer the key "f" to always be case insensitive. It will work much better for me as default.

+7
source share
2 answers

The simple answer is here: use the plugin. Others had an idea before.

  • Fanf, ingTastic; : find char through the lines

    The main goal of this plugin is to make f and t intersect the line border.

    To make them ignore case, you need let g:fanfingtastic_ignorecase = 1 in your vimrc.

  • ft_improved : improved f / t command

    The same thing here.

    To ignore this, you need to set the variable in your vimrc again, this time let g:ft_improved_ignorecase = 1 .

+3
source

You cannot do this with regular vim commands. However, you can write your own function and bind the f key to it.

0
source

All Articles