Loading ...
Sorry, an error occurred while loading the content.

Support for Lua scripting language

Expand Messages
  • Wolfgang Oertl
    Hi, On July 18 I announced my newest pet project, bringing the Lua scripting language to Vim. Since then it has matured into something almost usable. If
    Message 1 of 1 , Jul 27 1:12 PM
    • 0 Attachment
      Hi,

      On July 18 I announced my newest pet project, bringing the Lua
      scripting language to Vim. Since then it has matured into
      something almost usable. If you're interested, download [1] the
      patch and apply to the current vim snapshot (vim-7.0012.zip) as
      follows:

      mkdir vim-7
      cd vim-7
      unzip {path}/vim-7.0012.zip
      zcat {path}/vim-lua-0.3.patch.gz | patch -p1
      cd src
      make autoconf
      cd ..
      ./configure --enable-luainterp
      make
      src/vim

      :lua print("Hello, World!")
      :lua x = {this=1, is=2, a=3, test=4}
      :lua print(x.test)

      :lua vim.set_option("sw=4 sts=4")
      :lua print(vim.evaluate("2+2"))
      :lua buf = vim.buffer()
      :lua print(buf:name())
      :lua print(buf:getline(1))
      :lua buf:setline(1, "new first line")

      This is not yet a fixed (or complete) API, I'm open for
      suggestions. I've loosely oriented the funtions on what the Ruby
      binding for Vim offers.

      Cheers,
      Wolfgang Oertl


      [1] http://oertl.com/wolfgang/download/vim-lua-0.3.patch.gz
    Your message has been successfully submitted and would be delivered to recipients shortly.