Davic1
V2EX  ›  Neovim

从 init.vim 迁移到 init.lua 有什么优势吗?

  •  
  •   Davic1 · Oct 21, 2022 · 2461 views
    This topic created in 1313 days ago, the information mentioned may be changed or developed.
    Lua 似乎对插件作者会友好一些。除此之外还有什么理由使用 init.lua 而不是 init.vim 吗?

    在考虑要不要 all in lua.



    ===
    我自己倒是发现使用 lua 对 vim 的组件( buffer window tab etc.)的配置更直观。
    3 replies    2023-02-08 19:36:29 +08:00
    thedrwu
        1
    thedrwu  
       Oct 21, 2022 via Android
    搭车问一下 neovim 有跟进 :xrestore 的打算吗?
    adoyle
        2
    adoyle  
       Nov 14, 2022
    优势就是用 lua 写配置比 vimscript 更轻松。写 vimscript 太难受了。用 lua 写的插件,配置项更灵活,更容易扩展,因为可以把 function 作为参数传递。
    blessingsi
        3
    blessingsi  
       Feb 8, 2023
    越来越多的插件只支持 lua 配置,配置里面的 lua 代码越来越多,干脆全部迁移了。而且 vimscriput 用起来太难受了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2669 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 15:41 · PVG 23:41 · LAX 08:41 · JFK 11:41
    ♥ Do have faith in what you're doing.