Skip to content

Instantly share code, notes, and snippets.

@duykhoa
Last active May 18, 2020 13:10
Show Gist options
  • Save duykhoa/4b464cdcf2b72fe82076 to your computer and use it in GitHub Desktop.
Save duykhoa/4b464cdcf2b72fe82076 to your computer and use it in GitHub Desktop.
tmux copy mode list

###How to use enable vi mode Here

Press prefix and '['. Ex: Ctrl B [

I use Ctrl A for prefix

###My recommend

After go to vi mode prefix [

  1. vi movement keys: lkjh, find / or ?, f or F, etc
  2. v to start selecting.
  3. press y to yank (can use Enter also)
  4. the select content is copied to clipboard. Use anywhere :)

###Output of the command tmux list-keys -t vi-copy

bind-key -t vi-copy    C-b page-up
bind-key -t vi-copy    C-c cancel
bind-key -t vi-copy    C-d halfpage-down
bind-key -t vi-copy    C-e scroll-down
bind-key -t vi-copy    C-f page-down
bind-key -t vi-copy    C-h cursor-left
bind-key -t vi-copy    C-j copy-selection
bind-key -t vi-copy  Enter copy-pipe "reattach-to-user-namespace pbcopy"
bind-key -t vi-copy    C-u halfpage-up
bind-key -t vi-copy    C-y scroll-up
bind-key -t vi-copy Escape clear-selection
bind-key -t vi-copy  Space begin-selection
bind-key -t vi-copy      $ end-of-line
bind-key -t vi-copy      , jump-reverse
bind-key -t vi-copy      / search-forward
bind-key -t vi-copy      0 start-of-line
bind-key -t vi-copy      1 start-number-prefix
bind-key -t vi-copy      2 start-number-prefix
bind-key -t vi-copy      3 start-number-prefix
bind-key -t vi-copy      4 start-number-prefix
bind-key -t vi-copy      5 start-number-prefix
bind-key -t vi-copy      6 start-number-prefix
bind-key -t vi-copy      7 start-number-prefix
bind-key -t vi-copy      8 start-number-prefix
bind-key -t vi-copy      9 start-number-prefix
bind-key -t vi-copy      : goto-line
bind-key -t vi-copy      ; jump-again
bind-key -t vi-copy      ? search-backward
bind-key -t vi-copy      B previous-space
bind-key -t vi-copy      D copy-end-of-line
bind-key -t vi-copy      E next-space-end
bind-key -t vi-copy      F jump-backward
bind-key -t vi-copy      G history-bottom
bind-key -t vi-copy      H top-line
bind-key -t vi-copy      J scroll-down
bind-key -t vi-copy      K scroll-up
bind-key -t vi-copy      L bottom-line
bind-key -t vi-copy      M middle-line
bind-key -t vi-copy      N search-reverse
bind-key -t vi-copy      T jump-to-backward
bind-key -t vi-copy      W next-space
bind-key -t vi-copy      ^ back-to-indentation
bind-key -t vi-copy      b previous-word
bind-key -t vi-copy      e next-word-end
bind-key -t vi-copy      f jump-forward
bind-key -t vi-copy      g history-top
bind-key -t vi-copy      h cursor-left
bind-key -t vi-copy      j cursor-down
bind-key -t vi-copy      k cursor-up
bind-key -t vi-copy      l cursor-right
bind-key -t vi-copy      n search-again
bind-key -t vi-copy      q cancel
bind-key -t vi-copy      t jump-to-forward
bind-key -t vi-copy      v begin-selection
bind-key -t vi-copy      w next-word
bind-key -t vi-copy      y copy-pipe "reattach-to-user-namespace pbcopy"
bind-key -t vi-copy BSpace cursor-left
bind-key -t vi-copy  NPage page-down
bind-key -t vi-copy  PPage page-up
bind-key -t vi-copy     Up cursor-up
bind-key -t vi-copy   Down cursor-down
bind-key -t vi-copy   Left cursor-left
bind-key -t vi-copy  Right cursor-right
bind-key -t vi-copy   C-Up scroll-up
bind-key -t vi-copy C-Down scroll-down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment