DEV Community

loading...

Discussion on: Jaime's Guide to Tmux: The Most Awesome Tool You Didn't know you needed

Collapse
yujinyuz profile image
Yujin

I use zsh and I added the vi-mode plugin so I could hit and do I what I would normally do in Vim.

I tried removing that plugin and copied your config file in ~/.tmux.conf

setw -g mode-keys vi

But I'm not sure how to activate it, can you help me with this?

Collapse
vintharas profile image
Jaime 🔥🧙‍♂️🔥 Author

The vi key bindings in tmux that are activated with that configuration only work when you enable copy mode in tmux with CTRL-[. This mode allows you to scroll up/down inside a tmux pane, search, select and copy stuff, etc with vi key bindings.

For using vi bindings when inserting text you'll still need to enable vi within zsh as well. (But the vi support is so so)

The best vim experience in the terminal comes when using :terminal mode inside of Vim. I don't use it often. Only when I need to do something complicated with text in the terminal. But it would be fun to do more experimentation there. Perhaps in time I could rely more on Vim and less on tmux.

Collapse
vintharas profile image
Jaime 🔥🧙‍♂️🔥 Author

Btw this article describes vi mode in tmux quite well sanctum.geek.nz/arabesque/vi-mode-...