You are not logged in.

#1 2022-06-10 12:27:54

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,599

[Solved] tmux breaks quit highlight in VIM

Using search and highlighting and disable/stop highlighting using a key-combo works just fine for me.
Today I opened a tmux session and a document in VIM, used search/highlight but I'm unable to stop highlighting.
I don't normally use tmux to open a file in vim ...
Far as I can tell this only happens when 'in' tmux.
Normally the highlighting is stopped ending the VIM session or use ':nohlsearch', could be the tmux session is preventing this?
Used tmux without a local tmux.conf didn't solve the issue, so it may not be 'my' config being the culprit.
Before I open some bug-report I'd like to know; does anyone else see the same behavior?

The config I use to 'search / highlight / disable-highlight' is straightforward.

set incsearch
set hlsearch
...
nnoremap <c-space> :nohlsearch<cr>

edit: it's only the key-combo that fails, ':nohlsearch' works fine...

Last edited by qinohe (2022-06-10 14:05:45)

Offline

#2 2022-06-10 13:58:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,244

Offline

#3 2022-06-10 14:05:11

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,497
Website

Re: [Solved] tmux breaks quit highlight in VIM

qinohe wrote:

edit: it's only the key-combo that fails, ':nohlsearch' works fine...

Are you sure tmux isn't capturing that key-combo?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2022-06-10 14:05:22

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,599

Re: [Solved] tmux breaks quit highlight in VIM

Thanks seth, yeah I figured it out already I feel stupid now...

Default key-combo in tmux:

bind-key    -T copy-mode    C-Space              send-keys -X begin-selection

As you can imagine this wont work setting the same combo to VIM when opened in tmux...
Changing VIM key-combo to 'Ctrl-l' solved it;-)

edit: @Trilby, wink yep ^^

Last edited by qinohe (2022-06-10 14:06:49)

Offline

Board footer

Powered by FluxBB