| preprocessors |
|---|
sunflower uses the following special characters outside US-ASCII: ◊«».
this section documents how to type them in various environments.
◊: Option+Shift+V«: Option+\»: Option+Shift+\
go to Settings -> Keyboard -> Text Replacements and enter the replacements of your choice. Matthew Buttrick also recommends Typinator.
◊: holding down Alt, type 9674 on the numpad.«: holding down Alt, type 0171 on the numpad.»: holding down Alt, type 0187 on the numpad.
I've heard good things about WinCompose. Alternatively, there's always AutoHotKey:
; Binds Alt-f to ◊, Alt-j to «, Alt-k to ».
!f:: Send {U+25CA}
!j:: Send {U+00AB}
!k:: Send {U+00bB}
◊: Ctrl+Shift+U 2 5 C A Enter«: Ctrl+Shift+U A B Enter»: Ctrl+Shift+U B B Enter
you have several options here.
This requires you to have a compose key somewhere on your keyboard. See the Arch Wiki. On GNOME, you can configure it in Settings -> Keyboard -> Compose Key.
◊: no default binding. Instead you can use the alias⋄: Compose < >«: Compose < <»: Compose > >
i like keyd.
a lot of people i know like kmonad.
i cannot in good conscience recommend xmodmap, but it is an option.
Open a snippets file (File -> Preferences -> Configure Snippets -> New Global Snippets File -> "flower"). Add the following config:
{
"Lozenge": {
"prefix": "\\f",
"body": ["◊"]
},
"Left Guillemot": {
"prefix": "\\j",
"body": ["«"]
},
"Right Guillemot": {
"prefix": "\\k",
"body": ["»"]
}
}◊: Ctrl-K L Z«: Ctrl-K < <»: Ctrl-K > >
use vim.keymap.set:
vim.keymap.set('i', '\\f', '◊', { desc = "Lozenge" })
vim.keymap.set('i', '\\j', '«', { desc = "Sunflower open quote" })
vim.keymap.set('i', '\\k', '»', { desc = "Sunflower close quote" })(global-set-key "\M-\\" "◊"), or C-\ rfc1345 RET to toggle an input mode where &LZ (<<, >>) produces ◊ («, »).
on Windows, i use the neovim rebinding with no OS-level binding. on my home desktop, i have this bound to the symbol layer of my keyboard.