2015-05-20 11:06 GMT+03:00 feng D <[email protected]>: > I found that the InsertCharPre event not suport <enter> and <bs>.
Neither insert-mode command is inserting any characters, so InsertCharPre does not have a reason to work (though I think documentation on this matter can be enhanced). <Enter> is not inserting \r, \n, \r\n or something like this because internal buffer representation does *not* use any of them: it is simple C string end (NUL) internally, \r/\n/\r\n are inserted according to &fileformat when writing. It is also subjectable whether line break should be considered a character in a editor by its user or not, even if it is a character internally. I guess it is obvious why <BackSpace> *must not* trigger InsertCharPre under any circumstances, no matter the internals. > > <code>autocmd InsertCharPre * let v:char='|'</code> > > Who know why? > > -- > -- > 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 message because you are subscribed to the Google Groups > "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- -- 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 message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
