Skip to content

Instantly share code, notes, and snippets.

@brennen
Last active December 10, 2015 13:28
Show Gist options
  • Save brennen/4440922 to your computer and use it in GitHub Desktop.
Save brennen/4440922 to your computer and use it in GitHub Desktop.
A thought on handling custom multilingual character mappings, for @earthtopus.
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