Re: Access vim command from the lua end WAS: How do the default key commands work

2011-01-31 Thread Marco
On 2011-01-31 Ben Schmidt wrote: > > So I rephrase my question. How to access basic vim commands (here: %) from > > inside lua? How to access an arbitrary vim function from inside lua? > > Use the :normal command (probably with ! to avoid using user mappings). > E.g. > > :lua vim.command"normal

Re: Access vim command from the lua end WAS: How do the default key commands work

2011-01-30 Thread Ben Schmidt
It's not about remapping. I'm writing a vimscript in lua. In a function I need the position of the opening and closing bracket. So in vim I would execute »%« twice. Than I have both positions. If there would be functions for the basic comands I just would execute the corresponding function. But ap

Re: Access vim command from the lua end WAS: How do the default key commands work

2011-01-30 Thread Marco
On 2011-01-30 Tim Chase wrote: > If you want a catalog of the functionality, you can look at > things like > > [...] > > or more generically: > >:h index.txt Nice list I didn't know before. > They're available "natively" from within a "noremap" version of a > mapping. So if you want t