Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up a shortcut for knitr chunk in Lyx

Tags:

r

knitr

lyx

I'm new to Lyx and would very much like to set up a new shortcut for inserting a new Chunk (Insert > Custom Insets > Chunk)

I saw here how to set one up, but this is not the same; the Chunk menu item from the Custom Insets doesn't require the <<>>= and @ characters in the chunks.

Any help appreciated on how to (if possible) assign this command to a new shortcut.

like image 865
Dominic Comtois Avatar asked Dec 02 '25 09:12

Dominic Comtois


1 Answers

Here's how to do it, thanks to scottkosty's instructions on tex.

Go to Tools > Preferences > Editing > Shortcuts and create a new shortcut entering the following text as the function:

flex-insert "Chunk"

Then, just assign a key combination to it and you're done.

like image 107
Dominic Comtois Avatar answered Dec 05 '25 01:12

Dominic Comtois



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!