Tuesday, August 21, 2018

Re: lua

On Tuesday 21 August 2018 20:31,
rob <drrob100@fastmail.com> put forth the proposition:
> I'm going to have to grok this.
>
> It will take a bit of time.
>
> Thanks
>
> --rob
> On 08/21/2018 07:48 PM, Tony Mechelynck wrote:
> > On Wed, Aug 22, 2018 at 12:26 AM, rob <drrob106@gmail.com> wrote:
> > > Hi. I'm interested in getting code folding to work. I'm getting a message
> > > on Ubuntu 16.04 amd64 that lua has to be compiled in for a macro to work.

There are a few :help entries on folding, which can be found by e.g. :help
fold<tab> but :help foldmethod (or fdm) is probably the most useful.

I usually set it to 'marker' and add folds manually by putting {{{
}}} around whatever I want folded:

// {{{
<lines of code here>
// }}}

Then you can use a bind such as 'za' to open/close the fold. Change
'//' to whatever comment character(s) your code uses.

You can also add text after the fold lines - e.g.

// {{{ Function description

There are a bunch of different maps that work on folds - see :help
fold-commands.

Another useful one is foldenable (fen). If you set it in your
~/.vimrc it makes all folds closed when you open a file with folds
for the first time.

-Dave

> > > How do I get lua to be compiled into the make process?
> > >
> > > --rob
> > You can get folding without lua in any Normal, Big or Huge Vim; but
> > that doesn't help with your macro.
> >
> > For lua, you need, in addition to everything else needed to compile Vim:
> >
> > 1) lua installed on your system _with_ the corresponding "development"
> > packages (the latter are necessary to compile a program which uses
> > lua). I'm not sure how exactly to get these on Ubuntu (I'm on openSUSE
> > Linux) but you should be able to query your package manager about
> > packages whose names start with lua and make sure that at least the
> > lua library package and the lua development package are installed.
> >
> > 2) then you need to configure and compile Vim with lua. See the
> > following for details:
> > https://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
> > http://users.skynet.be/antoine.mechelynck/vim/compunix.htm
> > These two may seem a little complex but I tried to make them apply to
> > any use case. (I'm not sure I succeeded but at least I tried.)
> >
> > The relevant configure parameter is --enable-luainterp (e.g. export
> > CONF_OPT_LUA='--enable-luainterp') and I recommend to run "make
> > reconfig" to reconfigure and recompile after any change in your
> > configure settings (which I define by means of environment variables
> > so Make will get them right even if, as it sometimes happens, it
> > decides to run configure again before an ordinary compile).
> >
> > Before running "make install", run src/vim --version to see if the Vim
> > you just compiled has +lua (and everything else that you want it to
> > have). If it doesn't then it is time to ask yourself what went wrong.
> >
> >
> > Best regards,
> > Tony.

--

I forgot to mention an important fact in the 1.3.67 announcement. In order to
get a fully working kernel, you have to follow the steps below:
- Walk around your computer widdershins 3 times, chanting "Linus is
overworked, and he makes lousy patches, but we love him anyway". Get
your spuouse to do this too for extra effect. Children are optional.
- Apply the patch included in this mail
- Call your system "Super-67", and don't forget to unapply the patch
before you later applying the official 1.3.68 patch.
- reboot
-- Linus Torvalds, announcing another kernel patch

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'

--
--
You received this message from the "vim_use" 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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: