> It'll be convenient to be able to get the line number in these commands,
> but it seems that inside none of these VIM::evaluate('line(".")') or
> vim.eval('line(".")') will get that number.
That's true. One option -- at least for Lua -- would be to have an extra
parameter "linenr" for the line number in the function called by luado:
:luado return line .. ("[%d]"):format(linenr) -- line and linenr are params
I can come up with a simple patch for this feature. Meanwhile, you can have a
workaround by using a global variable:
:lua linenr = nil -- initialize counter
:luado if linenr==nil then linenr = vim.firstline - 1 end linenr = linenr + 1
return line .. ("[%d]"):format(linenr)
Cheers,
Luis
--
Computers are useless. They can only give you answers.
-- Pablo Picasso
--
Luis Carvalho (Kozure)
lua -e 'print((("[email protected]"):gsub("(%u+%.)","")))'
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php