V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Davic1
V2EX  ›  Neovim

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

  •  
  •   Davic1 · Oct 21, 2022 · 2364 views
    This topic created in 1283 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   ·   947 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 22:40 · PVG 06:40 · LAX 15:40 · JFK 18:40
    ♥ Do have faith in what you're doing.