9.11 keysym list syntax
Sung Pae
sungpae at gmail.com
Sat May 7 04:28:17 CEST 2011
Hello,
>From the 9.11 CHANGELOG:
> - remove 'list' syntax for keysym resources, as it serves no useful
> purpose. If you need it, poke us and provide a use case.
I like to use the list syntax to concisely set Mod4 to send a custom
prefix for use in vim.
For example (^G is a literal bell as inserted by vim):
URxvt.keysym.Mod4-0x20: list^G\033\040^G !"#$%&'()*+,-./0123 ...
sets Mod4 + ASCII printable chars (0x20..0x7e) to send ESC SPACE CHAR.
In vim then, I can loop and do something like: [1]
for n in range(0x20, 0x7e)
let char = nr2char(n)
execute 'map <4-'.char.'> ^[^V\ '.char
endfor
This allows Mod4 to be mapped as:
map <4-s> :w<CR>
Similarly, I set Mod4 + arrow keys as:
URxvt.keysym.Mod4-Left: list:\033\040\007:dacb:
URxvt.keysym.Mod4-Shift-Left: list:\033\040\007:DACB:
As you can see, I really enjoy this feature. However, if it really
needs to go, it would be nice to have a similar feature that explicitly
operates on ranges:
URxvt.keysym.Mod4: range:<START>:<END>:<PREFIX>:
I suppose the real solution is to patch vim and add Super/Mod4 support,
but my rxvt-unicode + vim setup works now, and it is a blissful place.
Cheers,
guns
[1]: This is a simplification; view the following in vim for details
https://gist.github.com/raw/960121/7e2e6749a31e5f725dead69f555c8372cb0770b7/gistfile1.txt
More information about the rxvt-unicode
mailing list