2

I use a US-international keyboard so that pressing 'a produces "á" while on insert mode.

However, I would like to access a mark named a by pressing 'a under normal mode. That doesn't work and as a workaround I have to press 'spacea.

Is there a solution? I mean, can vim even see that I pressed the ' key or the whole dead-key mechanism is invisible to vim so that it only gets a keystroke when a is typed afterward (I'm on Linux)?

In that last case I could, of course, remap "à" to "'a" on normal mode. But that wouldn't work with every key, I mean, pressing 'b produce no text output at all on my current keyboard layout.

0

Your hunch is right: The dead keys are handled by the operating system outside of Vim, and Vim only sees the result.

You could remap the ' command to a different key, but there are few unused ones left.

In case you're mostly editing in Vim (and you probably should, as it is such a superior experience), you don't need the US International layout at all: Vim provides its own input method for special characters, called digraphs. Inside Vim, you can enter the á character by pressing Ctrl + K, ', a.

| improve this answer | |

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.