Weird terminal/vim issue #3081
-
I 've been using Ghostty at work all week (thanks, @mitchellh !) and I 've been dealing with this odd issue every day very often. I am using VIM and I assigned On Ghostty, sometimes CTRL-K doesn't do anything on vim after using vim for a while. I know that because the script itself is not accessed/used so is a matter of the key combination being registered by vim. So ctrl-k does nothing.
If I restart VIM, it works perfectly fine again, until it doesn't.
I can't reproduce it on demand; it manifests fairly often but can't guess what triggers it. |
Beta Was this translation helpful? Give feedback.
Replies: 13 comments 4 replies
-
There isn't enough to go on here to say where this issue is. I need to ask you for more information: are you seeing the keyboard events in the terminal inspector? Can you build a debug version and see if anything pops up? Can you provide a more minimal reproduction (I'm not interested in reconfiguring neovim)? Does this reproduce if you change the keybindings? etc. |
Beta Was this translation helpful? Give feedback.
-
I will use the terminal inspector tomorrow, but vim(not nevoid) certainly doesn't register/react on the CTRL-K keypress. I understand it's weird, and it shouldn't have been Ghostty related, but I never had that issue before, with any other terminal, whereas I am getting this fairly often when using Ghostty. I 'll also experiment with a different keys combo, and whatever else I can do. Thank you. |
Beta Was this translation helpful? Give feedback.
-
According to the Terminal Inspector/keyboard
This seems to be fine, because restarting vim to get it to work again, reports the same sequence. |
Beta Was this translation helpful? Give feedback.
-
As I explained, I bound on ITerm2 (and every other terminal I've been using/tried):
on Ghostty:
So:
|
Beta Was this translation helpful? Give feedback.
-
Converted to a discussion until we can get a bit more reproducibility or information out of this as noted in our contributing guidelines. |
Beta Was this translation helpful? Give feedback.
-
For what it is worth, it hasn't been resolved yet; it's still happening. I need to restart VIM for this to work. It's not a big deal for me personally, but it's definitely odd. |
Beta Was this translation helpful? Give feedback.
-
I wonder if this might be a case of something that runs inside nvim accidentally messing up the keyboard mode |
Beta Was this translation helpful? Give feedback.
-
I ran into the same issue with vim and figured out a way to reproduce it: I used the default ghostty config and a minimal
At this point, quitting vim and opening it in the same ghostty window does fix the issue. Also it's worth mentioning that the default key commands to move between windows in vim (e.g. |
Beta Was this translation helpful? Give feedback.
-
Seeing something similar here using |
Beta Was this translation helpful? Give feedback.
-
I have the same issue described above. In VIM, I do use CTRL+J and CTRL+K to move left and right in my tabs. If I press Shift or the Alt key doing that combination, it becomes impossible to change my tabs. In fact, if I press any Alt+Key, I am reproducing the problem. To fix the issue, I must close VIM, but I can leave the terminal open. I made some tests with 'aerc' (email client), which I configured with 2 tabs using the same keybinds to switch between them. I can throw all kinds of key combinations and I don't experience the problem. I also did a test with neovim, which didn't cause the problem either. The key inspector is sending the same keys in both cases: when it's working as expected and when the issue occurs. I tested on River and Niri, the window manager doesn't affect the results. I looked at the open issues on the VIM side, I didn't find something similar; which is weird considering the popularity of Ghostty and VIM. Maybe we are posting in the wrong project... Environment:
|
Beta Was this translation helpful? Give feedback.
-
This is happening to me as well. I am using
It works for awhile and then just suddenly stops at some point. I close vim and open it again and it works. I'm using Debian 12. |
Beta Was this translation helpful? Give feedback.
-
For what it's worth, I switched to neovim (I wish I had done so earlier), and it is not affected by that issue. |
Beta Was this translation helpful? Give feedback.
-
I upgraded to vim 9.1.1100 today and this is no longer an issue 🎉 |
Beta Was this translation helpful? Give feedback.
I upgraded to vim 9.1.1100 today and this is no longer an issue 🎉