On Fri, 28 Mar 2003, Edwin Leuven wrote:

> On Fri Mar 28 2003 11:47, Christian Ridderström wrote:
> > which LyX parses when opening a lyx-file. This way you could also add
> > your own special keybindings that will be activated when you open a
> > certain .lyx-file.
> 
> i don't think i like the idea of per file interface settings; 
> this would imply that when i exchange docs with someone else i inherit this 
> persons keybindings
> 
> more in general i don't see why i would want to vary this for myself (but then 
> again, i'm only a simple mind)

I started thinking on this because I was working with a document that 
required the "Use temporary path" setting disabled.

Then I thought that this could be useful for some complicated key 
bindings, or if you would like to bind C-a to different things when you 
work in different documents.

As an example, I use this binding (it inserts a musical chord):

\bind "C-a" "command-sequence math-mode; line-end; math-insert \Ch; 
        char-backward; line-begin-select; cut; char-forward; paste; down;"

when editing documents in the Songbook style. A more frequent example 
might be to do something like this:

\bind "C-a" "command-sequence ert-insert; self-insert \matlab{}; inset-toggle;"

where \matlab{} is a special command I've defined in the preamble.

/Christian

-- 
Christian Ridderström                           http://www.md.kth.se/~chr


Reply via email to