Typing card suits in vim ♢♡♣♠
Digraphs are two letter combinations that provide a easy way to type and remember non-ascii characters in vim. In insert mode you can type a digraph with Ctrl-k and then two letters that map to the unicode character.
For card suits the pneumonic is lower case c for card and upper case C for clubs, D for diamonds, H for hearts, and S for spades.
cD ♢
cC ♣
cH ♡
cS ♠
You can see all the digraphs with :digraphs.
Now you have all the necessary unicode characters to easily create card games in the terminal!
Tweet