-- Emacs-like keyboard configuration for Ion, version 2. -- Written by Matthieu MOY (Matthieu.Moy@imag.fr) on February 16, 2004. -- No copyright. -- Copy this file in your ~/.ion2/ directory -- Add the line -- include("emacs-bindings") -- At the *end* of your ~/.ion2/ion.lua file. -- Comments/Feedback welcome. ionws_bindings{ submap(DEFAULT_MOD.."x", { kpress("AnyModifier+O", WIonWS.goto_right), -- Download it from http://modeemi.cs.tut.fi/~tuomov/ion/scripts/collapse.lua kpress("AnyModifier+1", collapse.collapse), }), kpress(DEFAULT_MOD.."Tab", function () end), kpress(DEFAULT_MOD.."Tab", nil), } ionframe_bindings{ submap(DEFAULT_MOD.."x", { kpress("AnyModifier+2", function(frame) frame:split("bottom") end), kpress("AnyModifier+3", function(frame) frame:split("right") end), kpress("AnyModifier+0", WIonFrame.relocate_and_close), kpress("AnyModifier+k", WIonFrame.close_sub_or_self), kpress("AnyModifier+b", querylib.query_gotoclient), }), } floatframe_bindings { submap(DEFAULT_MOD.."x", { kpress("AnyModifier+1", function(frame) frame:maximize_horiz() frame:maximize_vert() end), }), } function moy_switch_next(frame) if obj_is(frame:parent(),"WGenFrame") then moy_switch_next(frame:parent()) else frame:switch_next() end end function moy_switch_prev(frame) if obj_is(frame:parent(),"WGenFrame") then moy_switch_prev(frame:parent()) else frame:switch_prev() end end genframe_bindings{ kpress(DEFAULT_MOD.."Tab", moy_switch_next), kpress(DEFAULT_MOD.."Shift+Tab", moy_switch_prev), kpress(DEFAULT_MOD.."colon", querylib.query_lua), kpress(DEFAULT_MOD.."exclam", querylib.query_exec), kpress(DEFAULT_MOD.."space", make_mplex_sub_fn(WRegion.toggle_tag)), kpress(DEFAULT_MOD.."Control+space", function (f) f:attach_tagged() f:switch_next() end), } global_bindings{ kpress(DEFAULT_MOD.."colon", querylib.query_lua), kpress(DEFAULT_MOD.."exclam", querylib.query_exec), } query_wedln_bindings{ kpress("Control+K", WEdln.kill_to_eol), kpress("Control+space", WEdln.set_mark), kpress("Control+W", WEdln.cut), kpress("Control+Y", WEdln.paste), }