Re: Where to submit a patch/modification for consideration?
On 5/6/06, Mikolaj Machowski [EMAIL PROTECTED] wrote: Dnia sobota, 6 maja 2006 00:01, Eric Arnold napisał: On 5/5/06, Mikolaj Machowski [EMAIL PROTECTED] wrote: Dnia piątek, 5 maja 2006 14:35, Eric Arnold napisał: I think vim-dev@vim.org is probably a place to start... I've been hacking the statusline for a long time to do various things a keystroke at a time. I've finally got a compiling env, so I decided to take a stab a creating a key-event. Very, very, very good thing. It makes possible high-level of automation for some things - eg. map Space and pry it will not interfere with some scripts. Personally I'd like to see separation for Insert and Normal mode (GetChar, GetCharI?). I think 'mode()' will probably suffice for this? I've had bad experiences in the past with mode(). But maybe they were Have a look at the test script in the new version I'll post after this. only my things - I didn't really have time to test various possibilities of v:getchar. BTW - general rule for v:variables is they are read-only. It's a common rule, but there are several which are already read/write. It's the only clean way I can think of to deliver information back into a C function which has no Vim script equiv. Would be good thing to keep consistency. I knot it is late but this would be really good addition to Vim7. For example it could automatically open omnicompletion menu after some letters and in desired context - no need to press C-XC-O (or equivalent)! Possibilities are endless. m. Ya. I think it would be cool to have it released with Vim7 to be able to start writing scripts with it that will be publicly usable. I'm hoping I've isolated the changes enough that it will be acceptable. I think it's pretty solid, though there are some weird side cases, mostly dealing with re-calling back into 'getchar()'.
Re: Where to submit a patch/modification for consideration?
On 5/7/06, Eric Arnold [EMAIL PROTECTED] wrote: On 5/7/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 5/7/06, Eric Arnold [EMAIL PROTECTED] wrote: Can you clarify coulpe of points. 1. a) Is this event fired when getchar() or vim extract event from typeahead buffer for processing ?, or yes b) only when getchar() is invoked ? , or c) when the char is inserted into typeahead buffer ? Can you clarify this ? 2. The docs patch says: +Changing |v:getchar| + changes the value returned by the + |getchar()|function. I don't understand why this sentence doesn't mention that 'Changing |v:getchar| changes the value returned by the getchar() or seen by vim when vim read characters from typeahead buffer for processing', because it follows from your other examples that changing v:getchar can change which char vim will see ? Correct. It actually changes what is returned by vgetc() . I should reword it. Can I assign to v:getchar a string like \F1 ? What happens if I assign longer string like abc to v:getchar ? Will vim see only 'a', or vim will see eventually also 'b' and 'c' ? Can I assign something to v:getchar to tell it drop this character, as if there is no input ? Yakov
Re: Where to submit a patch/modification for consideration?
On 5/7/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 5/7/06, Eric Arnold [EMAIL PROTECTED] wrote: On 5/7/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 5/7/06, Eric Arnold [EMAIL PROTECTED] wrote: Can you clarify coulpe of points. 1. a) Is this event fired when getchar() or vim extract event from typeahead buffer for processing ?, or yes b) only when getchar() is invoked ? , or c) when the char is inserted into typeahead buffer ? Can you clarify this ? 2. The docs patch says: +Changing |v:getchar| + changes the value returned by the + |getchar()|function. I don't understand why this sentence doesn't mention that 'Changing |v:getchar| changes the value returned by the getchar() or seen by vim when vim read characters from typeahead buffer for processing', because it follows from your other examples that changing v:getchar can change which char vim will see ? Correct. It actually changes what is returned by vgetc() . I should reword it. Can I assign to v:getchar a string like \F1 ? Yes What happens if I assign longer string like abc to v:getchar ? Will vim see only 'a', or vim will see eventually also 'b' and 'c' ? It will treat it as a single char, and fail internally. I don't seem to get an err code from Vim, though. Can I assign something to v:getchar to tell it drop this character, as if there is no input ? Yakov Yes, let v:getchar = Looks like the doc page will be growing :-)
Re: Where to submit a patch/modification for consideration?
Can I assign to v:getchar a string like \F1 ? Yes Assuming it is translated to a 3 byte func key string in the context you use it,