Closed krishnakumarg1984 closed 4 years ago
Please compare the raw key output in wezterm vs. your iterm configuration:
xxd
Share the output; on my linux system in both xterm and wezterm I get 1e0a
.
On my macOS system in both iterm and wezterm I also get 1e0a
In all four of those environments, that key press toggles the alternate buffer in vim.
I cannot reproduce the behavior that you've described, so this sounds like a local configuration issue.
Well. This is what I got for the xxd
string.
^M00000000: 0d0a
Weirdly, there are two additional observations.
return/enter
causes a ^M
to appearC-d
twice to terminate xxd
.Okay, I found something. iterm2
by default provides the following i.e. I am not doing anything specific to get everything working as expected in iterm2. The default settings of iterm2
send the correct keystrokes already. Have a look at C-^
keycode in the screenshot of the default iterm settings shown below.
@wez any thoughts?
Are you pressing CTRL-6
or CTRL+SHIFT+6
?
Closing due to lack of feedback
@wez can you please reopen and look into this issue? I have exactly the same issue on my linux workstation as well. Pressing CTRL + 6
just makes vim go into visual block mode (which is incorrect). Just like macOS, I need to force the alternate buffer action using CTRL + SHIFT + 6
CTRL 6
is not the same thing as CTRL SHIFT 6
. They send different sequences.
iTerm
treating those the same is not a behavior that I plan to emulate; it's the only terminal I've tried that does that, and the behavior is ambiguous.
If you want your particular wezterm to treat CTRL 6
as CTRL SHIFT 6
then you can configure a key assignment for that key press to mirror the configuration you see in your iterm settings screenshot.
local wezterm = require 'wezterm';
return {
keys = {
{key="6", mods="CTRL", action=wezterm.action{SendString="\x1e"}},
}
}
@wez My wording in the previous comment was not clear, which I think led to your incorrect understanding.
Ctrl + 6
works correctly as expected in vim, i.e. opens the alternate bufferCtrl + 6
incorrectly enters the visual block
mode in vim. Hope I made it clear that there exists a bug in wezterm wherein Ctrl + 6
is not working correctly. This has nothing to do with iterm
.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
In
vim
normal mode,C-^
key combination incorrectly enters the visual-block mode. This is incorrect behaviour. visual block mode is to be entered only uponC-v
, whereasC-^
is meant to switch to alternate buffer.Environment
To Reproduce
vim -u NONE
:set hidden
file1
andfile2
from disk.:e file1
followed by:e file2
.file2
for a bit.esc
orC-[
.C-^
vim
unexpectedly enters visual block mode!Configuration
Wezterm was started with the default configuration (
wezterm -n
), and hence not relevant.Expected behavior
The
vim
buffer shall switch to the alternate file, in the above casefile 2
.