lighttable

How to "remove exception" from Light Table editor using keyboard only?


In Light Table version 0.8.1, say I'll evaluate clojure code like (resolve inc) and get an exception like in the picture. Now I can't see anything else on the whole screen.

exception in light table taking up most of the screen

I can right click it, choose "remove exception", but that means I have to get hand on the mouse. Or I can hit ctrl + s, save (which I might actualy not want to) and lose the exception but also all results of other evaluations. There is nothing in keymap, as far as I can figure.

So - can I do the equivalent of mouse action just using keyboard? This feels like punishment for coding something wrong :)


Solution

  • This can be accomplished with the command Eval: Clear inline results, but it will clear all the other inline results as well as the exception.

    It is possible to map the command to a keybinding. Add something like the following to your user keymap:

    [:editor "pmeta-i" :clear-inline-results]

    After the keymaps have been reloaded, you should be able to then use Ctrl-i (or Cmd-i) to clear the inline results.

    If you are not familiar with the user keymap, it can be accessed via the command Settings: User keymap.

    From what I can tell, Light Table does not currently have a command to clear inline results based on the cursor's location, but it would be useful. Please consider opening an issue on Github for this.