1

I am having a difficult time mapping some of my language specific keys (danish keys æøå) in ideavim. It works fine when i map without modifies eg. nmap æ / but when I try to map with alt eg. nmap <M-æ> { that does not get picked up. I can use Ctrl+V to see literals for remapping in proper vim, but not ideavim.

EDIT: I tried to use ctrl+q in insert mode, which works (when you set vim as handler in insertmode):

sethandler <C-q> n-v:ide i:vim
inoremap <C-q> {

But the same trick does not work for æ, so I am no further with that part.

sethandler <C-æ> n-v:ide i:vim
inoremap <C-æ> {
3
  • I have not used ideavim. In Vim, in normal mode, typing ga will give the ASCII / Unicode number of the character under the cursor is, displayed in the status line. Maybe that is useful for "seeing what vim 'sees'"?
    – m_mlvx
    Mar 31, 2022 at 4:07
  • @m_mlvx it does actually. æ gives "VIM - <æ> 230, Hex e6, Oct 346, Digr ae". I'm not sure how it can help mapping, but it is interesting, thanks :)
    – MyrionSC2
    Apr 2, 2022 at 13:47
  • I do not know the Danish keyboard; but Vim has "digraphs" ready, which you use by 'ctrl-k' then the two keys. For example, <C-k>14 gives ¼. You can see a list in Vim by :dig For me on the English keyboard, while in Insert Mode, I can type <C-k>ae to get æ or <C-k>AE to get Æ. I don't know if that can solve your problem?
    – m_mlvx
    Apr 2, 2022 at 22:22

1 Answer 1

1

Type ga when the cursor is above a character to get information about that character.

I got the following values (with a norwegian locale, yours may differ):

æ => 230
ø => 248
å => 229

You can then make remappings like this:

inoremap <Char-248> {
inoremap <Char-230> }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.