yi-editor / yi

The Haskell-Scriptable Editor
GNU General Public License v2.0
1.51k stars 201 forks source link

Most digraphs are not supported. (vim) #1032

Closed benjamin-travis-summers closed 7 years ago

benjamin-travis-summers commented 7 years ago

Yi.Keymap.Vim.Digraph defines a small subset of vim's (rfc1345) digraphs.

http://hackage.haskell.org/package/yi-keymap-vim-0.14.1/docs/src/Yi-Keymap-Vim-Digraph.html

We could fill out this list with the rest of the RFC1345 digraphs, but performance could be an issue. glirc (apparently) solves this by packing all the digraphs together into a big text string and using Text.foldr to scan it:

https://hackage.haskell.org/package/glirc-2.23/docs/src/Digraphs.html https://hackage.haskell.org/package/glirc-2.23/docs/src/DigraphQuote.html

Would it be worth importing this solution or maybe creating a separate rfc1345 package to solve this problem?

benjamin-travis-summers commented 7 years ago

Happy to do this! But, I'd like some feedback on how other people would prefer to see this done.

ethercrow commented 7 years ago

I don't expect performance to be a problem if we use a hashmap there.