Useful mapping to write some Spanish words in Vim

Usually I write on an UK keyboard and just change the keyboard layout when I need to type some Spanish text. This is easy and handy, just pressing alt + shift I’m able to change the layout.

Recently I’ve started to help with the translation of Perl Maven Tutorial to Spanish. Problem here is that code and Spanish text is mixed so I have to switch the layout constantly and turns out to be a nightmare. I could just type using Spanish keyboard layout but coding in general becomes tougher and Vim commands in particular become hell. (How was I able to do this for so many years?)

So I came across with some simple mappings that allow me to write most Spanish words I might need keeping the UK keyboard layout: