Search code examples
vimtmuxline-numbers

Does tmux support relative line-numbers?


Background.

I am a frequent vim-user, I just love the way you can navigate the buffers without ever having to reach for the mouse. I'm especially fond of the relative line numbers that let's me jump to specific lines with perfect accurecy, it just makes navigating that much faster. I also use tmux quite a bit since I often have a lot of stuff going on in my terminal.

The thing that bugs me the most though is when I use tmux copy-mode, it just takes forever to navigate to the line(s) you want to copy if you are using the arrow-keys, ctrl+p or k.

Searching for a unique keyword in the buffer is also not ideal but it might be faster if you already know what to search for. A lot of the time you make a search only to discover that the keyword you searched wasn't so unique after all and you didn't end up on the line you wished for anyway.

My question is this:

Does tmux support relative line-numbers?

..or line-numbers at all for that matter?

I can't find any information about this on the web. Nobody seems to be mentioning anything about this anywhere. Is there a better way?

Any other tips for ultra-speedy navigation in tmux copy-mode using the keyboard would also be very much appreciated.


Solution

  • tmux has a linenumber system in copy mode. however the first line is very bottom line.

    In copy mode you can press : to go to line but there is no option to show linenumber. You can use some vim motions (key-mode was set as vi) in copy-mode, e.g. j k 20j 20k f F t T gg G 20G H L M ^ $ / ? ctrl-u ctrl-d w b ....

    I think for copy a block of text, it is enough.. If you think you still cannot "ultra-speedy navigation", make a scenario, let's see how could we copy faster.

    check man-page of tmux for details.