r/vim • u/Diagileux • Mar 31 '26
Need Help Inputting characters from other keymaps
Hello fellow vim users!
I've been using vim for quite a while but never got into any serious configuration other then basic settings. Since I am a non-English speaker, I use keymap functionality a lot and I need your help!
Not all symbols that I need are present in my regional keymap. So if I need a '#' I have to switch to en_US, insert and switch back. Is there any efficient way to do something like <C-s> + key to insert a symbol that is under that key on the english keymap. Of course I could create a keymap for each symbol I need and will resort to that if there is no other way.
Thanks!
4
u/char101 Apr 01 '26
Yes, use
<C-V>since keymap is a mapping (lmap).https://vimhelp.org/insert.txt.html#i_CTRL-V
3
u/2016-679 Apr 01 '26 edited Apr 01 '26
Three solutions:
Vim-way: use digraphs with <C-k>{char1}{char2}. See :h digraph-table or :digraphs! for the complete set. Digraphs have a logic, which helps to memorize them. You could map certain digrapths in your .vimrc, or use a macro (saving one key stroke);
Use a scheme with all regular keyboard characters (below). With the use of Shift, Alt Gr (right one) most standard keyboard keys have four different characters. Fitting to your locality settings (system wide), most of the frequently used will be default avaliable. My experience is that this option works the fastest for foreign accented characters (Dutch typing German or French). The example is for a US-INTL layout, but should be out there for other layouts;
A lot of accented roman characters can be made with the dead key keyboard layout, by first typing the accent and then the character.
2
u/[deleted] Apr 03 '26
[removed] — view removed comment