On Saturday, December 28, 2013 11:25:06 AM UTC-3, Pedro Ferrari wrote: > On Tuesday, December 24, 2013 8:22:53 PM UTC-3, Ben Fritz wrote: > > On Tuesday, December 24, 2013 4:54:08 PM UTC-6, Pedro Ferrari wrote: > > > Along the way I realized that if try the following mappings > > > > > > nnoremap * *<C-o> > > > nnoremap # #<C-o> > > > > > > then once again: (i) in gVim the # mapping works fine and the * mapping > > > doesn't and (ii) in console vim none of the mappings work. > > > > > > I don't know if this a bug or a problem with my setup (I'm relatively new > > > to Vim) but any help will be greatly appreciated. > > > > > > Thanks! > > > > If I use vim -N -u NONE -i NONE then these two mappings work fine. > > > > If I drop the -N and just do vim -u NONE -i NONE then Vim searches for the > > word under the cursor and then beeps at me. > > > > Note that without the -N, Vim is running in "compatible" mode and therefore > > tries to behave like plain vi. With the -N it is in "nocompatible" mode. > > > > I don't know whether <C-O> is actually supposed to fail in compatible mode, > > but I do notice in the help for CTRL-O that it says "not in vi". > > > > I wonder if this is the cause, and whether something similar is going on in > > your actual mapping. > > > > ...oh nevermind, I guess you do a "set nocp" right in the beginning before > > you source the script. Time to investigate further... > > Thanks Ben for your reply. I indeed do a set nocp immediately after starting > Vim. I tried doing vim -u NONE and then both mappings work fine (i don't know > if this is because I updated vim to 7.4 patch 92 recently or what but now > they seem to work) However if I do gvim -u NONE (and set nocp) then the star > (*) mapping doesn't work whereas the hash (#) mapping does work. I use gVim > rather than console vim so I would really like this mapping to work under GUI > vim. Once again thanks for your help.
I believe that the problem (bug?) is that the * (star) key cannot be remapped: if I start vim with "vim -N -u NONE" (Vim 7.4 with patches 1-274) and run the command "noremap * :echo "star"<CR>" and press *, vim tries to perform a search. -- -- 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.
