Comments (5)
(I am trying this now that i this breakage has finally gotten on my nerves to a sufficient degree. You see, I use the Ctrl+HJKL keys to do tmux pane directional navigation, and i am a heavy Vim user.)
Now I have one question -- it's not clear to me what the vi-copy key binding has to do with affecting the regular -n C-J
binding. You say that the fix is to put the line that unbinds C-j
for the vi-copy
mode into my tmux config, but surely this will fail if I insert the line before the place where my tmux plugins are specified and presumably initialized?
Of course I am physically capable of inserting this line at the bottom, then it no longer is the case (as tpm
's instructions are clear to state) that tpm
's initialization remains at the bottom of my tmux configuration.
Then again I am just being overly pedantic to the point of being a joke, and I'll be sure to close this once I verify that it solves my problem. Thanks.
from tmux-copycat.
Hey, we've had this issue reported in #53.
I also propose steps how to fix this in that issue:
unbind C-j so that it no longer exits copy mode. This is the line to put in tmux.conf:
unbind -t vi-copy C-j
Can you please confirm this fixed the issue for you?
from tmux-copycat.
Yup I tested and it works. However I did also test the case where I paste unbind -t vi-copy C-j
into my .tmux.conf
but only at the top and it still works to suppress the C-J bind. This has me confused, but not enough to actually dig into it to figure out why it still works.
from tmux-copycat.
Thank you for confirming this works.
I should probably put some effort into fixing this properly so other users don't have to deal with this.
Now I have one question -- it's not clear to me what the vi-copy key binding has to do with affecting the regular -n C-J binding
tmux-copycat
defines a set of -n
bindings to create "copycat mode". Examples are n
and N
keys to jump to next/previous match.
This couldn't be done with "vi-copy" or "emacs-copy" key bindings. There's no way for those key bindings to execute shell scripts (I asked tmux creator).
The -n
key bindings are undefined and reset to default when a users exits "copycat mode".
We need to know which keys can exit tmux's copy mode and override them to detect this and reset -n
bindings to defaults.
Some of the keys that can exit copy mode by default are ctrl-c
, enter
, q
and ctrl-j
. We're "dynamically" fetching a list of those keys (see this function) and overriding it with -n
mappings.
If that function does not return C-j
as the key that exits copy mode, it is never overridden with -n
mapping.
I paste unbind -t vi-copy C-j` into my .tmux.conf but only at the top and it still works to suppress the C-J bind
It doesn't matter where you undefine C-j
(top or bottom of tmux.conf). Previously linked function runs at the moment a user invokes "copycat mode" (for example with a stored search). It is at that moment that the ctrl-c
, enter
, q
and ctrl-j
keys are dynamically overridden.
This is pretty complex. Let me know if you want more details about any of this.
from tmux-copycat.
I had the exactly same problem, while using C-j for pane navigation.
The command unbind -t vi-copy C-j
indeed solved the problem. Maybe it could be included as part of the plugin, saving time for other users ( avoiding understanding when/why the key is unbinded and searching for this fix).
from tmux-copycat.
Related Issues (20)
- tmux-yank stops working after one yank when tmux-copycat is present. HOT 13
- [PROPOSAL] Migration to ripgrep HOT 3
- Git status - Long file names are not detected properly HOT 1
- search not working HOT 4
- Is it possible to highlight all matches HOT 2
- Git status file search does not work with multiple panes HOT 1
- tmux-copycat slow on my machine HOT 24
- n/N bindings on window 6, pane 1 HOT 1
- Ignore $PROMPT text in backward searches HOT 2
- how to search across multiple lines ?
- Add the possibility of jumping forward or backwards from matches using vim syntax
- Anyone made it work with byobu?
- Fails to run without `en_US@UTF-8` locale
- Prefix C-g doesn't match paths starting with ../ HOT 3
- Tmux-copycat stops working after tmux commit f8ad72b2eeafc1146c116f73194a3950aa0c2143
- File search doesnt find files HOT 2
- Use native regex searches in tmux 3.2 HOT 6
- Way to disable a predefined searches. HOT 3
- FR: tmux-copycat (C-a C-u) for url search is not consistent with tmux-urlview
- Git status - issues with fish as default shell while using Allacrity
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmux-copycat.