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; We can assign it to, say, Ctrl+Alt+I (the same shortcut as RStudio). Then we will be able to input this quickly: <<>>= # cursor moved here automatically @ Regards, Yihui -- Yihui Xie <xieyi...@gmail.com> Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA