* [sup-talk] Best practice for customizing keymaps?
@ 2009-10-19 18:46 David Adams
0 siblings, 0 replies; only message in thread
From: David Adams @ 2009-10-19 18:46 UTC (permalink / raw)
To: sup-talk
Hello everyone,
I'd like to make some customizations to the default keymaps for a few
modes, and I was wondering what was the safest way to do so. On the
Hooks wiki page, the entry for startup.rb shows how to add keystrokes,
but based on trying that example out, it appears to work only for
adding new keystrokes, not overriding existing ones.
So after poking around at the code a bit, dropping this code into
startup.rb seems to work to entirely replace a keymap with my
preferences:
class Redwood::Mode
@@keymaps[Redwood::ThreadViewMode] = Redwood::Keymap.new do |k|
# key mappings omitted
end
end
So my questions are: Is this unsafe in any way (other than that new
versions of sup may invalidate the specifics of keymap
implementation)? And is there a better way?
Thanks!
-dave
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-10-19 19:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-19 18:46 [sup-talk] Best practice for customizing keymaps? David Adams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox