As @muru mentioned in the comment, you could use an equivalence class (described in :help /[[) which seems to be a character class expression evaluated as a set of similar characters (i.e. are the same once you remove any accent/diacritic).
For example, to look for kočička and kocicka with the same pattern, you could use this:
ko[[=c=]]i[[=c=]]ka
where [[=c=]] is the equivalence class for the c character.
To automatically insert this character class whenever you hit c while performing a search, you could use this mapping:
cnoremap <expr> c getcmdtype() =~ '[?/]' ? '[[=c=]]' : 'c'
which can be broken down like this:
<expr> type the evaluation of an expression
getcmdtype() =~ '[?/]' test whether you're writing a backward or forward search
'[[=c=]]' return the equivalence class for the c character if the previous test succeeded
'c' return the c character otherwise
The previous mapping has 2 drawbacks:
- it only covers the
c character
- it can make the pattern difficult to read
It could be improved by remapping <CR> like this:
cnoremap <CR> <C-\>e getcmdtype() =~ '[?/]' ? substitute(getcmdline(), '\a', '[[=\0=]]', 'g'): getcmdline()<CR><CR>
When you hit <CR> after writing a pattern for a search, the mapping will automatically replace all the alphabetic characters by their equivalence class counterpart.
The mapping for <CR> is similar to the previous mapping for c, except it doesn't use the argument <expr> but the system mapping <C-\>e.
<expr> allows you to insert the evaluation of an expression, while <C-\>e allows you to replace the whole command line with the evaluation of an expression.
:h [[=and:h patterns-composing. – muru Apr 17 '16 at 14:08