# file: ~/.tmux.conf
# v1.0.1
# this is your <<prefix>>
# remap prefix from 'C-b' to 'C-j', because it is the only letter left from the
# bash shortcuts with the Control option
unbind C-b
set-option -g prefix C-j
bind-key C-j send-prefix
# v1.0.2
# enable vi mode
set-window-option -g mode-keys vi
# confirm by <<prefix>> :list-keys -t vi-copy
# v1.0.3
# increase the number of lines - obs RAM consuming
set-option -g history-limit 9000
#v 1.0.4 easier copy paste
# src: https://leanside.com/2014/01/copy-paste-in-tmux/
setw -g mode-keys vi # vim-style movement
# in normal tmux mode#
# `tmux prefix + Escape` starts copy mode.
bind Escape copy-mode
# `prefix + p` pastes the latest buffer
bind p paste-buffer
#
# # in copy mode…
# `v` begins a selection. (movement keys to select the desired bits)
bind -t vi-copy v begin-selection
# `y` copies the current selection to one of tmux's "paste buffers"
bind -t vi-copy y copy-selection
# `V` changes between line- and columnwise selection
bind -t vi-copy V rectangle-toggle
# when in copy mode act like vim for Yanking
bind -t vi-copy Y copy-end-of-line
# ?!
bind + delete-buffer
#
# start ::: how-to build tmux from source on older boxes ?!
# mkdir -p /tmp/tmux-install; cd /tmp/tmux-install
# wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
# tar xzvf libevent-2.0.21-stable.tar.gz
# cd libevent-2.0.21-stable
# ./configure && make
# sudo make install
# # on GentOS
# sudo yum install -y ncurses-devel
# # or Ubuntu
# sudo apt-get install -y ncurses-dev
# # clone the latest stable master branch version
# git clone https://github.com/tmux/tmux.git
# cd tmux/
# sh autogen.sh
# /configure && make
# # and verify
# which tmux
# tmux -V
# stop ::: how-to build tmux from source on older boxes ?!
#
# v1.1.2
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# mkdir -p ~/.tmux/plugins
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tmux-copycat
## and verify by:
# find ~/.tmux/plugins -type d -maxdepth 2
## stdout should look like
# ~/.tmux/plugins/
# ~/.tmux/plugins/tpm
# ~/.tmux/plugins/tmux-copycat
#
# start ::: how-to enable <<prefix>> + / = highlighted search back in terminal !!!
# install by : <<prefix> , I
# v1.0.5
# enable search results highlighting in copy mode
# src: https://github.com/tmux-plugins/tmux-copycat
set -g @plugin 'tmux-plugins/tmux-copycat'
run '~/.tmux/plugins/tpm/tpm'
#
#
# Usage:
# ---------------------------------------------------------
# place into your ~/.tmux.conf
# reload by :
# <<prefix>>, :source-file ~/.tmux.conf when in tmux session
#
# reload plugings by:
# Ctrl + J, U
#
# v1.0.6
# A short cheat-sheet
# source: https://tmuxcheatsheet.com
# tmux sessions management
# tmux new -s sess-name
# tmux attach -t sess-name
#
# tmux sessions handling
# those require <<prefix>>
# :new<CR> new session
# ----------------------
# s list sessions
# $ rename session
# d exit a session without killing it
#
# tmux windows handling
# those require <<prefix>>
# tmux windows handling
# ----------------------
# c new window
# , rename window
# w list windows
# f find window
# q show windows numbers
# x kill window
# swap-window -t 0
#
# how-to save the pane ouput to a file
# <<prefix>>
# :capture-pane -S -2000
# where 2000 is the amount of lines to capture
# <<prefix>>
# :save-buffer /tmp/tmux-buffer.log
#
# VersionHistory
# ---------------------------------------------------------
# export version=1.1.3
# ---------------------------------------------------------
# 1.1.3 -- 2017-05-09 15:31:24 -- ysg -- add full instruction for src build
# 1.1.2 -- 2017-04-10 11:22:01 -- ysg -- instruction for faster plugins setup
# 1.1.1 -- 2016-12-07 13:50:49 -- ysg -- save buffer instructions
# 1.1.0 -- 2016-12-07 13:21:01 -- ysg -- better docs for copy-cat , shortcut for sessions
# 1.0.9 -- 2016-09-01 13:01:46 -- ysg -- swap window
# 1.0.8 -- 2016-08-29 11:24:09 -- ysg -- more shortcuts in doc
# 1.0.7 -- 2016-08-29 09:20:29 -- ysg -- more shortcuts in doc
# 1.0.6 -- 2016-08-23 23:12:29 -- ysg -- added cheat-sheet
# 1.0.5 -- 2016-08-23 22:04:23 -- ysg -- search highlight with plugins
# 1.0.4 -- 2016-08-17 08:38:02 -- ysg -- easier copy paste
# 1.0.3 -- 2016-07-20 09:34:18 -- ysg -- vi copy mode
# 1.0.2 -- 2016-07-20 09:28:18 -- ysg -- vi copy mode
# 1.0.1 -- 2016-07-12 23:29:33 -- ysg -- Ctrl + J as prefix
# 1.0.0 -- 2016-07-12 23:29:10 -- ysg -- orginal version
#
# eof file: ~/.tmux.conf
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!