How do I open a command window in a light table in the editor?

I am using light table for python development. On typing in an editor, if I want to open a command window with ctrl-space, it doesn't work. First, I have to press Alt-V to open the command window from the menu bar at the top. Is there any other way to open a command window using a keyboard shortcut as you type in the editor?

Note that I have enabled the emacs-keybindings on the light table.

Also note that Alt-V is a key binding that needs to be handled differently by light table and emacs. Whereas in the editor the light table seems to handle it, whereas its work in emacs (scrolling up) is not counted.

In this sense, I would like to ask, how can I handle key bindings that are handled differently by emacs and light table?

+3


source to share


1 answer


I shared this frustration when I started with LT. From http://docs.lighttable.com/

Change key bindings?

Keybindings are defined in .keymap files in the Light Table. To open a custom layout, execute the layout "Settings: User" command. To see the default bindings, you can configure: Default keymap command. Keys are linked based on a context (tag) that allows you to create context command schemas.

Customize key bindings

To add key bindings to your user.keymap file, add a vector to format [: TAG "KEYBINDING": COMMAND], for example. [: editor "alt-w": Editor.watch.watch selection]. If a command takes arguments, the commands and their arguments are in parentheses, eg. [: editor "alt- (" (: paredit.select.parent "(")]. Default fields can be subtracted / removed by prefixing the key with "-", eg. [: application "-ctrl-shift -d ": docs.search.show].



Note that the emas plugin gets in the way in the middle of it all. I'm running MAC OS and I enjoy most of the emacs keys out of the box, I don't know exactly why, but I don't care. so i finally don't really use emacs plugin

and i just defined the key bindings i missed on myuser.keymap

    ;; Your file has been converted to the new flat format.
    ;; Conversion does not preserve comments or indentation.
    ;; File is backed up at /Users/jaime/Library/Application Support/LightTable/User/user.keymap.bak
    [
     [:editor "ctrl-g" :goto-line]
     [:editor "ctrl-l" :lt.plugins.openurl/open-url "http://google.com"]

     [:editor "ctrl-i" :smart-indent-selection]
     [:editor "ctrl-o" :editor.doc.toggle]
     [:editor "ctrl-s" :editor.sublime.splitSelectionByLine]
     ;;  [:editor "alt-w" :editor.watch.watch-selection]
     ;;  [:editor "alt-shift-w" :editor.watch.unwatch]

     ;; ;; lt floating bars
     [:editor "ctrl-u" :toggle-comment-selection]
     [:editor "ctrl-c" :toggle-console]
     [:editor "ctrl-w" :workspace.show]


     ;; ;; emacs inheritance
     [:editor "ctrl-k" :editor.cut]
     [:editor "ctrl-y" :editor.paste]
     [:filter-list.input "ctrl-n" (:filter-list.input.move-selection 1)]
     [:filter-list.input "ctrl-p" (:filter-list.input.move-selection -1)]
    ]

      

Please note that there are no real ones on LT kill-ring

. I also commented some key bindings on default.keymap

like

;;  [:editor "ctrl-d" :editor.doc.toggle]

      

What hides the operation by default delete

, you need to disable the emacs plugin or comment out ctrl-space

, which shades the command prompt window as you need. You will find your local version at http://docs.lighttable.com/#plugins-directory

+2


source







All Articles