0

I want to press CTRL-; to generate the special character ö. I have tried to write this line in my .vimrc

inoremap <C-;> <C-K>o:

but nothing happens when I press CTRL-;. What am I doing wrong?

Nighel
  • 71
  • 12
  • 1
    `vim` or `gvim`? In `vim` that mapping will hardly work — terminals don't have charcter ``. Should work in `gvim` — works for me. – phd Mar 22 '22 at 12:23

1 Answers1

2

If you already have ö, why not use it directly?

inoremap <key> ö

Anyway, the core issue, here, is that the control character ^; doesn't exist. This means that TUI Vim, which cares about characters, not keys, can't see that Ctrl+; you pressed and thus can't do whatever you mapped to <C-;>.

I would suggest you find another mapping.

romainl
  • 186,200
  • 21
  • 280
  • 313