How do I set Vim mode in Light Table?
Asked Answered
G

2

21

How do I activate vim mode in Light Table 0.6.0. The docs say in the editor mode just type "vim" and it will auto complete, but now it doesn't? What do I add to my user behaviours?

{:+ {
 ;; The app tag is kind of like global scope. You assign behaviors that affect
 ;; all of Light Table here
 :app [(:lt.objs.style/set-skin "dark")]

 ;; The editor tag is applied to all editors
 :editor [:lt.objs.editor/no-wrap
          (:lt.objs.style/set-theme "default")]

 ;; Here we can add behaviors to just clojure editors
 :editor.clojure [(:lt.objs.langs.clj/print-length 1000)]}

 ;; You can use the subtract key to remove behavior that may get added by
 ;; another diff
 :- {:app []}}
Gingerich answered 11/1, 2014 at 0:33 Comment(0)
D
29

Had the same issue, from 0.6.0 changelog :

CHANGE: Emacs and Vim are now both plugins to be downloaded via the plugin manager

Download it, restart, and now it autocompletes when you type vim.

Doctrinal answered 11/1, 2014 at 12:3 Comment(0)
F
10

For default setting:

:editor [:lt.objs.editor/no-wrap
         (:lt.objs.style/set-theme "default")
         :lt.plugins.vim/activate-vim]

To customize it:

:editor [:lt.objs.editor/no-wrap
         (:lt.objs.style/set-theme "default")
         :lt.plugins.vim/activate-vim
         (:lt.plugins.vim/map-keys {"K" "{",
                                    "J" "}",
                                    "L" "$",
                                    "H" "^",
                                    "-" "$",
                                    "0" "^",
                                    "<BS>" "<PageUp>",
                                    "<Space>" "<PageDown>",
                                    "jj" "jj",
                                    "j" "gj",
                                    "k" "gk"})]

For all Vim mode keybindings see: https://github.com/marijnh/CodeMirror/blob/master/keymap/vim.js

Flatto answered 11/1, 2014 at 3:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.