Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using dead keys acute and grave/backtick in normal mode doesn't work #1519

Open
5 of 7 tasks
mnissl opened this issue Dec 30, 2024 · 2 comments
Open
5 of 7 tasks

Using dead keys acute and grave/backtick in normal mode doesn't work #1519

mnissl opened this issue Dec 30, 2024 · 2 comments
Labels
Input Issues related to keyboard or other types of input

Comments

@mnissl
Copy link

mnissl commented Dec 30, 2024

Steps to reproduce

I'm using macOS with a German locale and a German keyboard where ´ (acute) is a dead key and ` (grave/backtick) is produced by hitting shift and ´.

It easier to type ´ as it does not require the shift key. Thus in my .vimrc, I have defined: nmap ´ `

This works fine in Terminal of macOS!

In MacVim, neither ´ nor ` works.

For vowels, I got it working with mappings à la:

nmap ´á `a
nmap ´Á `A
nmap `à `a
nmap `À `A

But this does not work for consonants like b. The error is raised: E78: Unknown mark

Expected behaviour

Both ´b and `b should jump to the mark.

Version of Vim and architecture

9.1.727

Environment

OS: Sequoia, arm64
Terminal: macOS Terminal
$TERM: xterm-256color
$SHELL: /bin/zsh

How MacVim was installed

Homebrew

Logs and stack traces

No response

Vim configuration where issue is reproducable

No response

Issue has been tested with given configuration

  • by running MacVim.app from GUI macOS interface
  • by running vim/gvim/etc installed by MacVim
  • by running other versions of vim (e.g. /usr/bin/vim)

Issue has been tested with no configuration

  • by running mvim --clean (or gvim, supplied by MacVim distribution)
  • by running vim --clean (in terminal, supplied by MacVim distribution)
  • by running vim --clean (in terminal, other suppliers, e.g. /usr/bin/vim)

Other conditions

  • The both Homebrew packages "vim" and "macvim" are installed
@ychin ychin added the Input Issues related to keyboard or other types of input label Dec 30, 2024
@ychin
Copy link
Member

ychin commented Dec 30, 2024

Just to be clear here, you want to use the "`" key to jump to marks and not use them as dead keys right? If you use them in Terminal.app it kind of works but you still have to type "`" followed by a space and then "a" to jump to mark A.

But yes in MacVim currently there are some issues with how it handles dead keys in normal mode so it doesn't really work right now, and it's definitely on my plate to find a way to fix it. See #768 for example. Ideally we have a bit more controls over how we handle dead keys as well.

@mnissl
Copy link
Author

mnissl commented Dec 31, 2024

Just to be clear here, you want to use the "`" key to jump to marks and not use them as dead keys right? If you use them in Terminal.app it kind of works but you still have to type "`" followed by a space and then "a" to jump to mark A.

Yes, for vowels one still has to press space. To avoid the space key, this mapping comes in handy: nmap ´á `a

On Windows with GVim and a similar German keyboard layout where ´ and ` are dead keys, you don't have to press space in normal mode. By contrast in insert mode, if you want to input ´a, you do have to press space, otherwise you would end up with á.)

But yes in MacVim currently there are some issues with how it handles dead keys in normal mode so it doesn't really work right now, and it's definitely on my plate to find a way to fix it. See #768 for example. Ideally we have a bit more controls over how we handle dead keys as well.

There are also issues with replacing a single character with an accentuated character using the r command: for example, if the cursor is over a in normal mode and you want to replace it with á or à, then before entering the a you end up with the character the cursor is over being replaced with either ´ or ` and you are back in normal mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Input Issues related to keyboard or other types of input
Projects
None yet
Development

No branches or pull requests

2 participants