On 06/05/10 12:45, tyru wrote:
1. :source below code
2. Enter insert mode
3. Press<C-^>
4. Type "bar"
5. Vim outputs "noremap!", not "lnoremap"
--- code ---
" :lmap can't remap?
"
" Typing "bar" outputs "noremap!", not "lnoremap".
lnoremap foo<Esc>:<C-u>echomsg 'lnoremap'<CR>
noremap! foo<Esc>:<C-u>echomsg 'noremap!'<CR>
lmap bar foo
--- code ---
And this is another problem though,
set wildchar=<Tab>
set wildmode
and
lmap<Tab>
in command-line does not complete any mapping as :map does.
What is 'iminsert' set to? (See its help.) Unless it is 1,
language-mappings are not active:
if &imi == 0
echo "standard key bindings"
elseif &imi == 1
echo "language-mappings work"
elseif &imi == 2
echo "Input Method (IME or XIM) is active"
else
set iminsert? | echo "I don't know what this means"
endif
Setting 'keymap' sets 'imi' as a side-effect, but IIUC defining
language-mappings from the keyboard or by using :l[nore]map in a script
doesn't.
See also
:help i_CTRL-^
:help c_CTRL-^
Best regards,
Tony.
--
You men out there probably think you already know how to dress for
success. You know, for example, that you should not wear leisure suits
or white plastic belts and shoes, unless you are going to a costume
party disguised as a pig farmer vacationing at Disney World.
-- Dave Barry, "How to Dress for Real Success"
--
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