|
|
 | | From: | Jonathan Orlev | | Subject: | [VIM] What seems to be a bug in Vim version 6.3 -- Using mapping commands | | Date: | Tue, 18 Jan 2005 11:49:30 +0200 |
|
|
 | Hello everyone,
I want to ask about what seems to be a bug in VIM version 6.3 (a masterpiece program, imho), relating to the way mappings work in cmdline and insert modes.
I currently tested it on _two_ Win XP installations. The bug does not appear in Vim 6.2, so maybe it is not a bug but an option (although very unlikely, since the default should be backward compatible).
Here is how to test it: 1. Start VIM 2. Enter this command. You can use copy-paste. Do _not_ include the quotation marks: "abbreviate bla +blabla|map! mm +|noremap! nn +"
3. Enter insert mode.
4. Type: blamm (type it, don't use copy-paste) The text will be replaced to: +blabla+ as it should be (mm is mapped to +, and since + is not in the iskeyword group, the _abbreviation_ bla is expanded to +blabla)
5. Type: blann --- This time the text will be replaced to: bla+ (the bla _abbreviation_ was not expanded to +blabla) This is _not_ how it should be, the result should also be '+blabla+', just like when using 'mm'.
the only difference between the mapping of 'mm' and 'nn' is that in the first I used the 'map' command, while in the second I used the 'noremap' command. However, noremap should prevent nested expansion of mappings, not abbreviations.
This behavior is also the same when typing in the cmdline, or when using the cmdline versions of the mappings.
In versions 6.2 and 6.1 of VIM, which I also have installed, this works fine.
If anyone is familiar with it, or I am missing something, please reply.
If it is true, I will also send it to bugs@vim.org.
ThanQ,
Jonathan Orlev
|
|
 | | From: | Antony Scriven | | Subject: | Re: What seems to be a bug in Vim version 6.3 -- Using mapping commands | | Date: | 18 Jan 2005 09:25:19 -0800 |
|
|
 | Jonathan Orlev wrote:
> Hello, > > ThanQ very much for the answer.
If you don't mind, may I cordially suggest a `:%s/Q/k you/'? If you do, well, too late! :-)
> > It may not be backward compatible, but it was decided that > > the old behaviour was incorrect. > > I see. So what you are saying is that this is not a bug ? > This is intended ? Well, I can see the logic in it, but I > wish there was an option to change the behavior to the > way it was, because in all my plugins/ftplugins I am > using the "nore" version of the mappings, and now I have > to change them, although I do prefer to prevent remapping > (but not the expansion of abbreviations).
Apparently this has caused a problem with some people who have :inorempped the space bar to do clever things as they type. Now it won't expand abbrevs. I believe that it will be looked into, but I don't think it has high priority.
> Is there an option in VIM 6.3 to return to the original > behavior ?
Not that I know of. It is possible that workarounds exist, but I am not aware of them, sorry.
> Also: > >Search the vim-dev mailing list archives for discussion.
Oops.
> I looked on yahoo (http://groups.yahoo.com/group/vimdev/messages), > and searched for "noremap", but didn't seem to find it. > > Can you please send URL or tell me what to look for ?
Sorry, wrong list. Try the regular vim users list. The subject line is `maps and abbr expansions'. Also yahoo sucks, try gmane.org instead. I remember mention somewhere of the vim archives being made available in mbox format but I don't know if that happened or not.
Antony
|
|
 | | From: | Jonathan Orlev | | Subject: | Re: What seems to be a bug in Vim version 6.3 -- Using mapping commands | | Date: | Tue, 18 Jan 2005 20:21:00 +0200 |
|
|
 | Hello again Antony,
> Apparently this has caused a problem with some people who > have :inorempped the space bar to do clever things as they > type. Now it won't expand abbrevs. I believe that it will be > looked into, but I don't think it has high priority.
Imho, it is a good idea to do one of the following: 1. Ad a 'set' option to control if noremap commands expand nested abbreviations or not. 2. maybe create a second set of 'noremap' commands, that will be similar to the 6.2 and before version of those command in VIM.
I think that the second option, or using both of them is best.
I am not a professional programmer, so it is difficult for me to determine the complexity of the manner.
Regards,
Jonathan Orlev
"Antony Scriven" wrote in message news:1106069119.637791.211590@z14g2000cwz.googlegroups.com... > Jonathan Orlev wrote: > > > Hello, > > > > ThanQ very much for the answer. > > If you don't mind, may I cordially suggest a `:%s/Q/k you/'? > If you do, well, too late! :-) > > > > It may not be backward compatible, but it was decided that > > > the old behaviour was incorrect. > > > > I see. So what you are saying is that this is not a bug ? > > This is intended ? Well, I can see the logic in it, but I > > wish there was an option to change the behavior to the > > way it was, because in all my plugins/ftplugins I am > > using the "nore" version of the mappings, and now I have > > to change them, although I do prefer to prevent remapping > > (but not the expansion of abbreviations). > > Apparently this has caused a problem with some people who > have :inorempped the space bar to do clever things as they > type. Now it won't expand abbrevs. I believe that it will be > looked into, but I don't think it has high priority. > > > Is there an option in VIM 6.3 to return to the original > > behavior ? > > Not that I know of. It is possible that workarounds exist, > but I am not aware of them, sorry. > > > Also: > > >Search the vim-dev mailing list archives for discussion. > > Oops. > > > I looked on yahoo (http://groups.yahoo.com/group/vimdev/messages), > > and searched for "noremap", but didn't seem to find it. > > > > Can you please send URL or tell me what to look for ? > > Sorry, wrong list. Try the regular vim users list. The > subject line is `maps and abbr expansions'. Also yahoo > sucks, try gmane.org instead. I remember mention somewhere > of the vim archives being made available in mbox format but > I don't know if that happened or not. > > Antony >
|
|
 | | From: | Antony Scriven | | Subject: | Re: What seems to be a bug in Vim version 6.3 -- Using mapping commands | | Date: | 18 Jan 2005 03:31:06 -0800 |
|
|
 | Jonathan Orlev wrote:
> Hello everyone, > > I want to ask about what seems to be a bug in VIM version > 6.3 (a masterpiece program, imho), relating to the way > mappings work in cmdline and insert modes. > > [snip: :noremap doesn't trigger an :abbrev any more]
ftp://ftp.vim.org/pub/vim/patches/README 6.2.418 abbreviation still used for result of ":noremap" mapping
> I currently tested it on _two_ Win XP installations. The > bug does not appear in Vim 6.2, so maybe it is not a bug > but an option (although very unlikely, since the default > should be backward compatible).
It may not be backward compatible, but it was decided that the old behaviour was incorrect. Search the vim-dev mailing list archives for discussion.
Antony
|
|
 | | From: | Jonathan Orlev | | Subject: | Re: What seems to be a bug in Vim version 6.3 -- Using mapping commands | | Date: | Tue, 18 Jan 2005 16:28:40 +0200 |
|
|
 | Hello,
ThanQ very much for the answer.
> It may not be backward compatible, but it was decided that > the old behaviour was incorrect.
I see. So what you are saying is that this is not a bug ? This is intended ? Well, I can see the logic in it, but I wish there was an option to change the behavior to the way it was, because in all my plugins/ftplugins I am using the "nore" version of the mappings, and now I have to change them, although I do prefer to prevent remapping (but not the expansion of abbreviations).
Is there an option in VIM 6.3 to return to the original behavior ?
Also: >Search the vim-dev mailing > list archives for discussion.
I looked on yahoo (http://groups.yahoo.com/group/vimdev/messages), and searched for "noremap", but didn't seem to find it.
Can you please send URL or tell me what to look for ?
Regards and ThanQ for the answer,
Jonathan Orlev
"Antony Scriven" wrote in message news:1106047866.673185.214530@z14g2000cwz.googlegroups.com... > Jonathan Orlev wrote: > > > Hello everyone, > > > > I want to ask about what seems to be a bug in VIM version > > 6.3 (a masterpiece program, imho), relating to the way > > mappings work in cmdline and insert modes. > > > > [snip: :noremap doesn't trigger an :abbrev any more] > > ftp://ftp.vim.org/pub/vim/patches/README > 6.2.418 abbreviation still used for result of ":noremap" mapping > > > I currently tested it on _two_ Win XP installations. The > > bug does not appear in Vim 6.2, so maybe it is not a bug > > but an option (although very unlikely, since the default > > should be backward compatible). > > It may not be backward compatible, but it was decided that > the old behaviour was incorrect. Search the vim-dev mailing > list archives for discussion. > > Antony >
|
|
|