Comments (5)
@aserowy Let me see if I can help with this and/or take it over. Sucks that you're not using tmux anymore!
@kohane27 can you please run in vim/neovim :nmap <A-h>
(along with the other keys) and let me know what command those keys are mapped to?
Have you installed any other plugins recently?
from tmux.nvim.
tyvm!
I mean, i am not using tmux anymore because i switched my working environment to linux completly :) i would say this is a good thing :D
from tmux.nvim.
Hello guys! I figured it out.
TL;DR: it was a keybinding conflict with a tmux plugin I use called tmux-tilish.
The following maybe helpful for debugging if you have similar problems:
If you achieve cycle-free navigation in nvim, it means it's not a problem with tmux.nvim
. The problem very likely lies within your tmux config.
Try the default keybindings outlined in tmux.nvim#navigation. Do not remap the keys just yet. Remember to tmux kill-sever
to make sure tmux
reloads the changes. If it works, then it means you have keybinding conflicts within your tmux environment. This was my case.
If you happened to use tmux-tilish that was causing this issue for me, go to its source code and comment out the following:
# Switch to pane via Alt + hjkl.
tmux $bind "${mod}${h}" select-pane -L
tmux $bind "${mod}${j}" select-pane -D
tmux $bind "${mod}${k}" select-pane -U
tmux $bind "${mod}${l}" select-pane -R
You also need to set set -g @tilish-navigator 'off'
and add cycle-free navigation outlined in tmux.nvim#navigation to your .tmux.conf
. The full code:
set -g @tilish-navigator 'off'
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
# navigation
bind-key -n 'M-h' if-shell "$is_vim" 'send-keys M-h' { if -F '#{pane_at_left}' '' 'select-pane -L' }
bind-key -n 'M-j' if-shell "$is_vim" 'send-keys M-j' { if -F '#{pane_at_bottom}' '' 'select-pane -D' }
bind-key -n 'M-k' if-shell "$is_vim" 'send-keys M-k' { if -F '#{pane_at_top}' '' 'select-pane -U' }
bind-key -n 'M-l' if-shell "$is_vim" 'send-keys M-l' { if -F '#{pane_at_right}' '' 'select-pane -R' }
bind-key -T copy-mode-vi 'M-h' if -F '#{pane_at_left}' '' 'select-pane -L'
bind-key -T copy-mode-vi 'M-j' if -F '#{pane_at_bottom}' '' 'select-pane -D'
bind-key -T copy-mode-vi 'M-k' if -F '#{pane_at_top}' '' 'select-pane -U'
bind-key -T copy-mode-vi 'M-l' if -F '#{pane_at_right}' '' 'select-pane -R'
Reload and it should work. Cheers!
from tmux.nvim.
Heho,
the config seems fine. Currently im not using tmux in my workflow anymore. Thus, i have no idea why it stopped working :D
To get a better grasp: What tmux version are you using? Maybe we have an issue on this end, because #{pane_at_left} should resolve only if there is a pane at the left.
Kinde regards
Alexander
from tmux.nvim.
Thank you for taking a look into this. I appreciate it:)
:nmap <A-h>
n <M-h> * <Cmd>lua require("tmux").move_left()<CR>
:nmap <A-l>
n <M-h> * <Cmd>lua require("tmux").move_right()<CR>
:nmap <A-j>
n <M-h> * <Cmd>lua require("tmux").move_bottom()<CR>
:nmap <A-k>
n <M-h> * <Cmd>lua require("tmux").move_top()<CR>
The problem is not within neovim; it's that I can't disable pane cycling within two terminals (like I shown in first video). Pane cycling is indeed disabled in two neovim buffers (like I shown in second video).
I haven't installed any other plugins recently.
Config:
NVIM v0.7.2
tmux 3.3a
Thank you again!
from tmux.nvim.
Related Issues (20)
- " keymap intersects normal workflow HOT 8
- How can I clear the screen with C-l HOT 1
- Searching for neovim process on Nix HOT 1
- statusline disappear when cmdheight=0 HOT 8
- Can not navigate between tmux panes when in vim insert mode HOT 1
- Navigating out of lazy.nvim window results in Error: WinLeave Autocommands ... HOT 6
- Enhancement: Not jump to other tmux pane if current pane is in fullscreen HOT 2
- Add wezterm support as a new backend beside tmux HOT 1
- Enabling copy_sync breaks `i_CTRL-R_CTRL-P "` HOT 3
- tmux.nvim copy_sync related crash HOT 5
- When using C-hjkl with command-line window open (q:) I get: Invalid in command-line window HOT 2
- Add option to overwrite the is_vim command. HOT 1
- Copy sync functionality
- Copy pipe
- nvim very laggy when pressing and holding find match motion (%) and clip_sync is true
- Could this support nvim-window-picker? HOT 3
- Bug Report: Copy Sync Not Working on Neovim v0.10.0 HOT 3
- Support specifying resize step in `resize_*` methods HOT 1
- Fail to map `<C-S-HJKL>` to resize splits HOT 2
- Slows down commands HOT 6
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.nvim.