【问题标题】:How do I set Vim mode in Light Table?如何在 Light Table 中设置 Vim 模式?
【发布时间】:2014-01-30 04:10:16
【问题描述】:

如何在 Light Table 0.6.0 中激活 vim 模式。文档说在编辑器模式下只需输入“vim”,它就会自动完成,但现在不是了吗?我要为我的用户行为添加什么?

{:+ {
 ;; 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 []}}

【问题讨论】:

    标签: clojure lighttable


    【解决方案1】:

    从 0.6.0 更新日志中遇到同样的问题:

    更改:Emacs 和 Vim 现在都是可以通过插件管理器下载的插件

    下载它,重新启动,现在它会在你输入 vim 时自动完成。

    【讨论】:

      【解决方案2】:

      默认设置:

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

      自定义:

      :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"})]
      

      有关所有 Vim 模式键绑定,请参阅:https://github.com/marijnh/CodeMirror/blob/master/keymap/vim.js

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-07-07
        • 1970-01-01
        • 2014-01-27
        • 1970-01-01
        • 2019-05-19
        • 2017-03-26
        • 2010-09-12
        相关资源
        最近更新 更多