The problem is that i{
is a whole operator-pending command (or text object) and mappings don't really work for the later parts of an existing command or mapping. If you want to support i{
(and its friend a{
) in operator-pending and visual modes, you would need an additional set of mappings to explicitly do so:
omap iĸ i{
omap aĸ a{
xmap iĸ i{
xmap aĸ a{
But a much better way to accomplish this key mapping is to use the 'langmap'
feature, which allows you to remap keys in normal mode. For your particular use case you will also need to set 'langremap'
.
set langmap=ĸ{
set langremap
This will take care of Normal mode, Visual mode, operator-pending mode and also mappings involving the {
symbol.
It will not take care of Insert mode or command-line mode. For that, you can either keep using a :map!
(which typically works fine), or there's also a 'keymap'
option for the Insert mode equivalent of 'langmap'
, but 'keymap'
is considerably more complex (it involves creating a separate mapping file with unique syntax and there are a few additional options controlling where exactly the mapping is activated.)