My knowledge of low-level notebook programming is very limited so I would be very grateful for any input regarding the following issue:
I would like to define an input alias (via InputAliases) that evaluates
parse[InputString[]]
in-place (like selecting it and then performing Menu → Evaluation → Evaluate in Place or Cmd + Return). The function parse will translate my textual input into an expression (and insert it at the current cursor position).
Currently, I am using the following alias,
SetOptions[EvaluationNotebook[],
InputAliases->{"parse"->RowBox[{"parse","[","InputString","[","]","]"}]}]
and the workflow looks like this
ESCparseESCto produceparse[InputString[]]- Press
Ctrl+.a few times to selectparse[InputString[]] - Evaluate in place via
Cmd+Return - Type something into the input field and press
Return
Basically, I would like to get rid of steps 2 and 3. I would appreciate any other solution if the desired behavior cannot be achieved using InputAliases. I would also be more than happy if an InputField could be used instead of InputString.
Comments
Post a Comment