I 18th this effort. I've been using Vim since May this year and have run into
this innocently trying to map <c-i>, <c-h>, and <c-bs>.
Paul Evans suggested to use a modifiedunicode option (along with some other
options) to enable the "new features":
:set nomodifiedunicode
:map <Tab> ONE
:map <Ctrl-I> TWO
:set modifiedunicode
and Bram said that it would be too complicated. I agree.
Bram followed by suggesting a mapping prefix "X-" for the new mappings we all
want:
:map <X-C-[> :echo CTRL-[<CR>
:map <X-C-I> :echo CTRL-I<CR>
But I also think that's still to complicated.
The simplest solution (that Benjamin Haskell suggests in his previously
mentioned table) is to make the keys map exactly how the user wants.
map <tab> :echo "tab key pressed"
map <c-i> :echo "control plus I pressed"
map <c-s-i> :echo "control shift I pressed"
map <esc>c :echo "escape c pressed"
map <a+c> :echo "alt plus c pressed"
map é :echo "eh?"
Users of the new vim will just simply have to change their mappings accordingly.
If you were doing:
map <c-i> :echo "the real tab"
Well, don't.. Change it to:
map <tab> :echo "the real tab"
That's not too much to ask for, especially since the influx of new users aren't
aware of these problems when they start using vim and will try literal mappings
because it's intuitive. They will not map <c-i> thinking "oh, now I've modified
what tab does". No. They'll instead be thinking "why on earth does ctrl+i not
work. aaaarrrghh?" and pull their hair out.
If you're someone who's used to doing
map <c-[> echo "I've changed the escape key"
Well, then you'll just have to adapt. We live in a much more modern world.
Adding options like modifiedunicode or prefixed map identifiers like <x-c-[> is
unnecessary. My .vimrc should simply *just work* the way i intend and expect
when I map <c-[>. How this all gets implemented in the inner workings of vim is
irrelevant when considering how .vimrc should behave. Doing
imap <c-bs> :Whatever<cr>
in .vimrc works just fine in gVim, as it should in console vim.
So, basically, nothing needs to change in the way that I can currently write my
.vimrc file (no new settings, no new mapping identifiers, just everything
works).
The most trouble this will cause is that some people will have to rewrite their
mappings with the correct keystroke identifiers, which is very easy to do.
I hope this proposal becomes reality sometime sooner than later!
--
--
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/groups/opt_out.