如何在Light Table中设置Vim模式?

 林俊雯868043 发布于 2023-02-04 15:08

如何在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 []}}

小智.. 29

有相同的问题,从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

    2023-02-04 15:11 回答
  • 有相同的问题,从0.6.0更改日志:

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

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

    2023-02-04 15:12 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有