Re: [patch] Add Error autocmd event

2016-03-19 Fir de Conversatie mattn
BTW, if incldue this patch, vim will allow to create any commands. function! s:OverrideCmd(msg) if a:msg =~ "^E492: Not an editor command: " " something endif endfunction au! Error E492 call s:OverrideCmd(v:errmsg) For example, create command name leading lower letter, multibyte string, o

Re: [patch] Add Error autocmd event

2016-02-27 Fir de Conversatie Anton Lindqvist
On Thu, Feb 25, 2016 at 10:17:34PM +0100, Bram Moolenaar wrote: > > Anton Lindqvist wrote: > > > Bram, > > I noticed your comment in todo.txt about the fact that the current > > solution only remembers the code of last error that occurred. Here's a > > first attempt address this issue by using an

Re: [patch] Add Error autocmd event

2016-02-25 Fir de Conversatie Bram Moolenaar
Anton Lindqvist wrote: > Bram, > I noticed your comment in todo.txt about the fact that the current > solution only remembers the code of last error that occurred. Here's a > first attempt address this issue by using an growarray. Caution: I don't > know if it's wise to clear the array in the mai

Re: [patch] Add Error autocmd event

2016-02-25 Fir de Conversatie Anton Lindqvist
Bram, I noticed your comment in todo.txt about the fact that the current solution only remembers the code of last error that occurred. Here's a first attempt address this issue by using an growarray. Caution: I don't know if it's wise to clear the array in the main loop. -- :wq -- -- You recei

Re: [patch] Add Error autocmd event

2016-02-22 Fir de Conversatie Anton Lindqvist
Realized I was using my personal preference for cinoptions. Here's a revised patch with correct indentation. -- :wq -- -- 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/m

Re: [patch] Add Error autocmd event

2016-02-17 Fir de Conversatie Anton Lindqvist
Updated patch attached which adds a missing autocmd feature check. -- :wq -- -- 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 --- You received this messag

Re: [patch] Add Error autocmd event

2016-02-14 Fir de Conversatie Anton Lindqvist
Here's a revised patch including a more rigorous way of parsing the error code from a error message. Another use-case I've been trying recently: if wrapscan is initially disabled, enable it when the search hits top/bottom. This way one is notified that the search reached the end but pressing n/N a

Re: [patch] Add Error autocmd event

2016-02-09 Fir de Conversatie 'Andy Wokula' via vim_dev
Am 09.02.2016 um 20:48 schrieb Anton Lindqvist: Can you think of a command or situation where this patch provides a nice, useful solution? Other than the examples already provided, here's a couple of ideas: - Opening a new file in a non existing directory and then write triggers a E212 whic

Re: [patch] Add Error autocmd event

2016-02-09 Fir de Conversatie Anton Lindqvist
Bram, On Mon, Feb 08, 2016 at 10:57:37PM +0100, Bram Moolenaar wrote: > > Anton Lindqvist wrote: > > > This is a result of a previous discussion[1] which concluded that a > > more general Error autocmd event would be a better addition than the > > proposed TagNotFound event. > > > > Questions a

Re: [patch] Add Error autocmd event

2016-02-09 Fir de Conversatie Ben Fritz
On Tuesday, February 9, 2016 at 2:01:43 AM UTC-6, Christian Brabandt wrote: > > Can you think of a command or situation where this patch provides a > > nice, useful solution? > > I think, it has come up in the past before: > - Catching E482/E484/E485 because /tmp got cleaned out would be > poss

Re: [patch] Add Error autocmd event

2016-02-09 Fir de Conversatie Christian Brabandt
Hi Bram! On Mo, 08 Feb 2016, Bram Moolenaar wrote: > Anton Lindqvist wrote: > > > This is a result of a previous discussion[1] which concluded that a > > more general Error autocmd event would be a better addition than the > > proposed TagNotFound event. > > > > Questions and comments regarding

Re: [patch] Add Error autocmd event

2016-02-08 Fir de Conversatie Bram Moolenaar
Anton Lindqvist wrote: > This is a result of a previous discussion[1] which concluded that a > more general Error autocmd event would be a better addition than the > proposed TagNotFound event. > > Questions and comments regarding the patch in no particular order: > > - Is the addition to the m

[patch] Add Error autocmd event

2016-02-08 Fir de Conversatie Anton Lindqvist
Hi, This is a result of a previous discussion[1] which concluded that a more general Error autocmd event would be a better addition than the proposed TagNotFound event. Questions and comments regarding the patch in no particular order: - Is the addition to the main_loop function at a suitable loc