On Tue, Nov 27, 2012 at 12:44 PM, Yihui Xie <x...@yihui.name> wrote: > This is a solution instead of a question. Over a long I have been > wondering how to input an Sweave chunk template in LyX, i.e. <<>>= and > @. I just figured it out thanks to the hint from Liviu. We can add a > shortcut (Preferences=>Editing=>Shortcuts) with this command sequence > (be sure _not_ to include the possible line breaks introduced by > Gmail): > > command-sequence ert-insert; unicode-insert 0x3C; unicode-insert > 0x3C; unicode-insert 0x3E; unicode-insert 0x3E; unicode-insert 0x3D; > break-paragraph; break-paragraph; unicode-insert 0x40; up;
Thanks, Liviu and Yihui. This is indeed handy. Note that in master (to become 2.1), "break-paragraph" is renamed to "paragraph-break". In master branch, the following works: command-sequence ert-insert; unicode-insert 0x3C; unicode-insert 0x3C; unicode-insert 0x3E; unicode-insert 0x3E; unicode-insert 0x3D; paragraph-break; paragraph-break; unicode-insert 0x40; up; The former LFUN was discordant with the LFUN naming rules, in particular <<1) Use the object.event order. That is, use `word-forward' instead of `forward-word'>> Scott