Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
After trying to make this work:
Map a sequence of letters in insert mode
I can’t get the correct answer to work. Is it still working? Can anyone post a working .vimrc file?
I want to get this:
When I type 'a in insert mode I want vim to change it to á.
An easy way to get á by typing 'a in insert mode is to first :set keymap=accents.
You might use digraph to enter á.
Just enter the sequence Ctrl-ka'.
Or: Set the option digraph with :set digraph. Then you can enter á with aBackspace'.
Read more about digraphs with :help digraph.
If you need it regularly, the better solution seems keymap as proposed by @troydj.
Required, but never shown