-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
Describe the bug
When using the 'langmap'
setting to map keys from non-English keyboard layouts into keys such as braces and brackets in Normal mode, if the "from" key in the mapping is an accented character such as á
, é
or ø
, or an extended symbol such as €
, the "to" is not used to expand mappings defined with that symbol. If the "from" character is a basic symbol such as (
, [
or 3
, it works as expected.
To Reproduce
Detailed steps to reproduce the behavior:
- Run
vim --clean
- Create a mapping to make
<
turn the text object uppercase:nmap < gU
- Set a langmap with a special key mapping to
<
, for example:set langmap=á<
- Type some contents into the buffer, preferrably lines with lowercase letters and with some indentation.
- Use the
áj
command.
Expected behavior
I'd expect this to behave the same as gUj
, meaning turn the current and following line to uppercase.
Instead, this ends up executing the original behavior of <
, which is to unindent the current and following line.
The 'langremap'
setting doesn't seem to make a difference here. (As I understand it, it defines how the RHS of mappings work.)
Using a symbol in the 7-bit ASCII range seems to work fine, for example :set langmap=[<
or :set langmap=3<
.
Environment (please complete the following information):
- Vim version 8.2.2127 (latest from GH), Vim 8.2.1885 (Fedora), (also DroidVim, version 8.2.1704)
- OS: Linux (also Android for DroidVim)
- Terminal: GNOME Terminal (DroidVim ships its own copy of the Android Terminal Emulator)
Additional context
Uncovered in this question on the Vi & Vim Stack Exchange.