Last active
December 10, 2015 13:28
-
-
Save brennen/4440922 to your computer and use it in GitHub Desktop.
A thought on handling custom multilingual character mappings, for @earthtopus.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun! MapFancyChar() | |
let mapping = { | |
\ 'l' : 'ł', | |
\ 'L' : 'Ł' | |
\} | |
let char = nr2char(getchar()) | |
let mapcheck = get(mapping, char) | |
if mapcheck != "0" | |
return mapcheck | |
endif | |
return char | |
endfun | |
inoremap <silent> / <C-R>=MapFancyChar()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment