Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 308 by [email protected]: Command-line expression mapping
inserts tab literally
https://code.google.com/p/vim/issues/detail?id=308
What steps will reproduce the problem?
:cnoremap <expr> <Tab> getcmdpos() == 1 ? 'X' : "\<Tab>"
:e<Tab>
What is the expected output? What do you see instead?
Expected result after hitting tab is some form of tab completion, actual
result is a literal tab being inserted: :e^I.
What version of the product are you using? On what operating system?
Vim 7.4.560.
Please provide any additional information below.
Consider these two mappings:
:cnoremap <expr> <Tab> getcmdpos() == 1 ? 'X' : "\<Tab>"
:cnoremap <expr> <C-D> getcmdpos() == 1 ? 'Y' : "\<C-D>"
The goal is to make <Tab> and <C-D> do something special only when the
cursor is in the first column, otherwise do the default action. This
works with <C-D>, which lists completion matches, but <Tab> inserts a
literal tab instead of completing.
Perhaps related discussion at
http://stackoverflow.com/q/14842987
https://groups.google.com/d/msg/vim_dev/xf5TRb4uR4Y/pUXfsMMC9cwJ
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
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.