All, I think good news, bit frustrating though.
I have done my work and I was finding out how to commit my patches when I noted Bram has already applied several patches from this thread and also others. The version in Mercurial is essentially the same as my version. I tested on awk scripts from Donald Allen and Zvezdan Petkovic and it works fine. I kindly ask you to get the latest awk.vim and try it for yourself. It should work. Let me know if it does not work and supply example code, I can take a look next week. I also looked at the R indenter, it's impressive, but I couldn't see how I could be of value supplying ideas about speeding up. I'd say stick at the updated awk indenter for awk. Happy awk-ing, I am doing it by far not enough these days (python has advantages) Regards, Erik. On 17 sep, 20:42, Donald Allen <donaldcal...@gmail.com> wrote: > On Sat, Sep 17, 2011 at 12:39 PM, Jakson Alves de Aquino > > > > > > > > > > <jalve...@gmail.com> wrote: > > On Sat, Sep 17, 2011 at 9:18 AM, Donald Allen <donaldcal...@gmail.com> > > wrote: > >> On Fri, Sep 16, 2011 at 9:06 AM, Jakson Alves de Aquino > >> <jalve...@gmail.com> wrote: > >>> I agree that the indent/r.vim script is very slow, but I don't know > >>> how to improve the speed. For each line to be indented, the script has > >>> to calculate what was the indent level of the last command, but the > >>> last command is not always the line above. So the algorithm goes > >>> slowly upwards until finding the beginning of the last command. I > >>> think it would be necessary to take a different approach. > > >> I haven't read your code, but perhaps remember the indent level of the > >> 'last command' as you make your forward pass over the indentation > >> region? > > > Yes, I have already thought about this. Instead of going backwards > > looking for the beginning of the command the script could first go > > backwards looking for any character in column 1 or the beginning of > > the file and, then, goes forward, remembering the current indent > > level. While going forward, it would be possible to keep track of the > > indentation level. This could be faster, but I don't have the > > necessary spare time to implement this alternate algorithm. > > I can certainly understand the spare time problem :-) > > /Don > > > > > > > > > > > Best regards, > > > Jakson > > > -- > > 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, visithttp://www.vim.org/maillist.php -- 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