On 17/07/09 17:22, Ben Fritz wrote:
>
> I'm using gvim on Windows XP, and I've tried the following mapping:
>
> nnoremap<kEnter> G
>
> The intent is to keep the normal functionality of<CR>, but allow me
> to rapidly go to a certain line using the numeric keypad.
>
> Unfortunately, the mapping never fires! Some experimentation shows
> that Vim gets a CTRL-M for both<Enter>/<CR> and for<kEnter>.
>
> I would like to be able to map<kEnter> separately from<Enter>...any
> suggestions?
>
> This also does not work in console vim on my PC or on a unix server
> accessed through PuTTY.
Works for me on Linux in gvim 7.2.234 with GTK2/Gnome2 GUI.
After
:map! <kEnter> -
:map <kEnter> G
hitting keypad-Enter in Normal mode goes to the end of the file, hitting
it repeatedly in Insert mode inserts dashes. The functionality of the
main-keyboard Enter key isn't affected.
Before I made these mappings, both Ctrl-V Enter and Ctrl-V kEnter (in
Insert mode) placed ^M into the buffer, but :echo "«\<Enter>»" displays
only the closing » (the carriage-return has erased the «) while :echo
"«\<kEnter>»" displays «<80>kA» with the <80> in blue.
What does gvim reply to
:verbose map <CR>
:verbose map! <CR>
:verbose map <kEnter>
:verbose map! <kEnter>
?
BTW, if Windows doesn't tell gvim the difference between keypad-Enter
and main-Enter you can't map them separately; this sounds unlikely to me
but I cannot test it.
Oh, and what's your Vim version and patchlevel?
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
80. At parties, you introduce your spouse as your "service provider."
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---