[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim-dev
Subject:    Support for Lua scripting language
From:       Wolfgang Oertl <lobo.lobo () gmx ! at>
Date:       2004-07-27 20:12:12
Message-ID: 20040727201212.GA4557 () oertl ! at
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic