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
<C-h> (CTRL-H) does not work in the new TUI #2048
Comments
|
I experience the same on OSX with iterm2. |
|
what is displayed if you type |
|
With nvim, Commit: 0df6b91 |
|
Same here. |
|
any chance you compiled against the wrong libtermkey version? Does |
|
Same behavior for me. |
|
what is displayed when you press ctrl+h in the |
|
|
|
I use I'm using the PPA version of nvim - tried 0.0.0+git201502201750+6 I run in tmux in terminator on Ubuntu. |
|
FWIW, I bisected the merges and it broke at merge #2039 |
|
@jwkvam that PR didn't change anything related to parsing these keys: https://github.com/neovim/neovim/pull/2039/files As I said, there was a problem with how libtermkey handled ctrl+h or backspace, but it was fixed in a recent commit: neovim/libtermkey@619c0c1 |
|
Experiencing the same problem on the latest build (61c98e7). I'm in iTerm, and the problem happens both inside and outside of tmux. |
|
One further detail: this problem happens in nvim with a blank .vimrc. |
|
I'm experiencing exactly this same problem. The entire contents of my I'm using OSX 10.10.2 with iTerm2 and NVIM 0.0.0-alpha+201502261923. The problem occurs both inside and outside of tmux and also in Terminal.app. All three other bindings work, but |
|
Oh, and |
|
Same thing here. Default left-navigation key mapping for the vim-tmux-navigator plugin is broken. iTerm on OSX 10.10.2. With & without Tmux. Also broken in Terminal.app. Works fine in terminal MacVim. |
|
Experiencing this as well. iTerm on OSX 10.10.2 |
|
I'm also fighting with trying to bind It's not a good solution, but if you're looking for a workaround, replacing |
|
I think we have enough reports now no one else needs to confirm there's a problem, so no further need to add on to this thread. |
|
@tarruda as everybody concerned seems to be using OS X, this (somewhat elderly) post might be relevant: it suggests that OS X terminals are defining a different erase character than Linux in the xterm terminfo, thus causing occasional issues with Backspace / Ctrl-h (which is the backspace equivalent when you use Emacs readline keybindings). |
|
Another alternative is to use |
|
@ladislas What is |
|
@ZyX-I my bad, it's It's just from the remap actually... |
|
@kopischke, I wasn't going to chime in since there are already a lot of reports for this bug, but I just wanted to add that I'm experiencing the same on Arch linux (Using the AUR package which may be outdated) Update: I don't have this problem in Ubuntu (using the package from apt-get) |
|
i'm in archlinux too. this must be because of one the terminal libraries. in nvim EDIT: and i've built it manually too, just in case the versions might cause a problem. i also tried it in xterm to see if the issue is rxvt specific works for example. though that's a terrible workaround |
Because now <c-h> works again thanks to neovim/neovim#2048 (comment)
|
FWIW, I've found this in tmux source: /*
* Check for backspace key using termios VERASE - the terminfo
* kbs entry is extremely unreliable, so cannot be safely
* used. termios should have a better idea.
*/
bspace = tty->tio.c_cc[VERASE];
if (bspace != _POSIX_VDISABLE && (key & KEYC_MASK_KEY) == bspace)
key = (key & KEYC_MASK_MOD) | KEYC_BSPACE;https://github.com/tmux/tmux/blob/fe4e9470bb504357d073320f5d305b22663ee3fd/tty-keys.c#L625-L632 And it gets set for panes initially: Not sure if it's really helpful, but might give some idea to fix this. |
|
@blueyed Yes, that's the traditional way to avoid this issue (Vim uses the same approach): fall back to termios. We would like to do that, but it requires forking libtermkey (or more ideally, getting a hook in libtickit when libtermkey is merged into libtickit). |
When opening a new shell when tmux is not running then run tmux new If tmux is already running, give a choice to connect to an existing session or create a new one (or qQ to not). With these dotfiles it is not recommended to work outside of tmux due to neovim/neovim#2048. While there are many solutions in the issue thread the one that works best for me is to rebind c-h in tmux to send the proper command to neovim. YMMV.
Previous fix for C-H did not allow for navigating left to a different tmux pane. By putting the fix here we can be sure that the C-H binding is only changed when inside of n/vim. As always, see here for more information: neovim/neovim#2048 (comment)
Workaround for neovim/neovim#2048.
This adds the ability to include custom terminfo files in this repo, which will be used when available. I've used it to fix the bug in OS X's default terminfos which prevents C-h from working correctly in neovim. As a result, this commit also removes that workaround from init.vim. The included ti files were generated using the technique in neovim/neovim#2048 (comment): infocmp $TERM | sed 's/kbs=^[hH]/kbs=\\177/' > $TERM.ti && tic $TERM.ti
This issue crops up because almost all programs special-case backspace to be ctrl-h. See neovim/neovim#2048 (comment)
|
I know I'm late to the party, but if anyone is looking for a solution with a more limited scope the approach I used will gracefully fallback to termios settings if needed for your terminal without requiring a global setting. https://github.com/dojoteef/dotfiles/blob/master/init/50_nvim.sh#L39 |
|
Update: @blueyed post to ncurses mailing list: https://lists.gnu.org/archive/html/bug-ncurses/2016-11/msg00022.html Update: #5758 is an attempt to fix this issue. |
|
This is fixed on master (not released yet). To build from source, you probably need to: However master is unstable currently, so most users should wait until the next release. |
I use the following mappings on my
.nvimrcand it does not work using tmux inside urxvt.env output
The text was updated successfully, but these errors were encountered: