screenããtmuxã«ä¹ãæãããå¿«é©ï¼(äºç¹é¤ã)
ãã£ã¨screen使ã£ã¦ããã©ã
時代はGNU screenからtmuxへ - Gマイナー志向
ã®ã¿ã¤ãã«ã«ãããã¦å¤ãã¦ã¿ãã
å人çscreenã®å©ç¹
- ãããã¯ã¼ã¯åã£ã¦ãå¥ã®ã¯ã©ã¤ã¢ã³ãããã§ãåãç¶æ ããåéã§ããã
- ãããã¯ã¼ã¯åã£ã¦ãããã»ã¹æ¢ã¾ããªããnohupè¦ããã
åºæ¬åããã¨ã ãã©ããããã¨ã¦ãç´ æ´ããã
ã¨ãããã¨ã§ã¡ããã¨ãããã§ããã確èªããã¨ããã£ããã§ããã
screenã®å ´åã¯è¨å®ãå¿
è¦ã ã£ãdetachæä½ããã«ãããã¯ã¼ã¯ãåã£ãã¨ãã«èªåçã«ãã¿ãããã(autodetach on)ãããã©ã«ãã§åä½ã
(tmuxã ã¨detach-on-destroy)
.tmux.conf
.screenrcã«ããããã®ã¯~/.tmux.conf
åºæ¬çãªèª¬æã¨ãã¯ä»¥ä¸ãªã³ã¯åç
§ã
.tmux.confをごにょごにょする - mizchi log
以ä¸ãèªåã®è¨å®
# Prefix set-option -g prefix C-q # ããã©ã«ãã®Prefix(C-b)ãè§£é¤ unbind C-b # View # ã¹ãã¼ã¿ã¹ã©ã¤ã³æ´æ°éé(ç§) set -g status-interval 5 set -g status-left-length 100 set -g status-right-length 50 set-option -g set-titles on # www1.hoge.comâwww1ã®ã¿è¡¨ç¤ºã set-option -g set-titles-string "@#(hostname | sed 's/\\\\..*//')" # ã¹ãã¼ã¿ã¹ã©ã¤ã³ã«ã¹ã¿ã é¢é£ set -g status-bg black set -g status-fg white set -g status-attr dim # å·¦é¨:whoami@hostname set -g status-left '#[fg=green,bold][#20(whoami)@#H]#[default]' # å³é¨:[2011/03/06(Sun)20:21] set -g status-right '#[fg=green,bold][%Y/%m/%d(%a)%H:%M]#[default]' set -g message-attr bold set -g message-fg white set -g message-bg red set -g pane-active-border-fg white set -g pane-active-border-bg black set-window-option -g mode-bg white set-window-option -g mode-fg black set-window-option -g window-status-bg black set-window-option -g window-status-fg white set-window-option -g window-status-current-bg green set-window-option -g window-status-current-fg black set-window-option -g window-status-current-attr bold # Option # utf8æå¹ set-window-option -g utf8 on # ã³ãã¼ãé¸æã¢ã¼ãã®ãã¼ãã¤ã³ãvi/emacs set-window-option -g mode-keys vi # ãã¦ã¹æå¹ãMacã®Terminal.appã§ã¯å¹ãã⦠set-option -g mouse-select-pane on # ã¦ã£ã³ãã¦çã®çªå·åºæºå¤ set-option -g base-index 1 # KeyBindings # ç´åã®ã¦ã£ã³ã㦠bind C-q last-window # è¨å®ãªãã¼ã bind r source-file ~/.tmux.conf # ã¦ã£ã³ãã¦é¸æç»é¢ bind Space choose-window # æ°ã¦ã£ã³ãã¦ä½æ bind c new-window # åå²ãã¦ãããã¤ã³ãããããWindowã« bind b break-pane # ãã¤ã³ã®ç¸¦åå² bind h split-window -v # ãã¤ã³ã®æ¨ªåå² bind v split-window -h # ãã¤ã³ãªãµã¤ãºé¢é£vi風 bind -r C-h resize-pane -L 6 bind -r C-l resize-pane -R 6 bind -r C-j resize-pane -D 6 bind -r C-k resize-pane -U 6 bind -r s swap-pane -U # ãã¤ã³çµäº bind k kill-pane # ã¦ã£ã³ãã¦çµäº bind K kill-window # ãã¤ã³çªå·è¡¨ç¤º bind i display-panes # ã³ãã¼ã¢ã¼ãçªå ¥ bind y copy-mode # ãã¼ã¹ã bind p paste-buffer
ãã¡ã¤ã«ã¯ããGitHub - u1tnk/dotfiles
åºæ¬viæ
£ãããä½ã«ãããããããã«ãã¦ã¿ãã
å¤ãã£ã¦ãã®ã¯Prefixãã¼ãctrl+qã«ãã¦ãã¨ãããªã
æ®éã ã¨ctrl+tããããã©ãscreenã®ã¨ãã«é ãã¦ä½¿ãè¾ãã¨æã£ã¦ãã®ã§å¤ãã¦ã¿ãã
ãã¶ã£ãããã¦å°ã£ã¦ã¯ããªãããemacsã®äººã¨ãå°ãã®ããª??
æªè§£æ±ºäºé
以ä¸ã®ãã¼ã¸ãè¦ã¦è¨å®ããããã°ã¤ã³æèªåèµ·åãã¤ãã»ãã·ã§ã³ããã£ããã¢ã¿ãããç¡ãã£ãããã¿ãããã«ããã¨åºã¾ããã¨ãããã
http://meme.biology.tohoku.ac.jp/students/iwasaki/tmux
ã©ããè¤æ°ã¯ã©ã¤ã¢ã³ãã§ä½¿ã£ãã¨ãããã¡ãªããã§ä¸ååºã¾ãããã«ãªãã¨ãã£ã¨ãã¡ã
zshrcã«å
¥ãã¦ããããã°ã¤ã³ã§ããªããªã£ã¦æ£ã
ã§ããã
ããããã®ã³ãã³ããæã§å
¥åããã¨åºã¾ããªããã§ãããzshrcã«ã³ãã³ãå®ç¾©ããã¨ãã¡ã§ããã
åºã¾ã£ãã¨ãã«psè¦ãã¨tmux ls ã®ããã»ã¹ãè¤æ°ãã£ã¦å
¨é¨çµãããªãâ¦
screenã ã£ãã
screen -D -R
ã§ä¸çºãªãã§ããã©ãã
tmux ã¯
tmux attach
ã ã¨æ¢åã»ãã·ã§ã³ãç¡ãã¨ãã¯ã¨ã©ã¼ã«ãªãã®ã§â¦
ã¾ããã»ã¨ãã©ã¯æ¢åã»ãã·ã§ã³ãããã®ã§ãã»ã¼å¤ãããªãã®ã§ããã
ã§ããã£ã±.zshrcã¨ãã§èªåèµ·åããã®ã¯ãã°ã¤ã³ã§ããªããªãã®ãæãã®ã§ãããªãæ¹ãè¯ãã§ããã
ã¨ãããã¨ã§
alias ta="tmux attach"
ã§ããã°ã¤ã³ãããã¨ã«å
¥åãã¦ãã対å¦ã¯ã§ãããã©ãããã©ãããã®ã§â¦
ã¡ãªã¿ã«ååã®sshしか使えないマシンで.xxrcのせいでログインできなくなったときの対処法 - 凡人プログラマã¯ãã®ç¾è±¡ãåå ã§èª¿ã¹ã¾ããâ¦
Macã®ãã¼ã«ã«ã§ä½¿ç¨ããã¨vimã§ã³ããã§ããªãã
yã¨ãpã®ã³ããã ãåãã¾ããã
- ææ°ã®MacVim-Kaoriyaã¯ãã¡
- ææ°ã®MacPortsã§å ¥ããvim7.3ããã¡
- ããã©ã«ãã®/bin/vimã¯ok
以ä¸ã®ä»¶ãã¨æã
vim - copy-paste not working in MacVim when launched in tmux - Super User
以ä¸ã®ããããã¦ã¦ã¿ããã©ãã¡ã
Fix tmux bootstrap · GitHub
çµå±ããã©ã«ãã®7.2ã使ãããã«ãã¦åé¿ã
å人çã«ãã¼ã«ã«ã ã¨MacVim-Kaoriyaã®GUIã§ã»ã¨ãã©æ¸ã¾ãã®ã§ãããã§å¦¥åã§ãã¾ãããããã¼ã«ã«ã§ãCUIçã使ãã¾ãã人ã ã¨è´å½çã ã¨æãã¾ãâ¦
ãã¼ããããã¤ã解決ããããã ãåä¸è¶³ã§â¦è§£æ±ºãã人ãããæãã¦ãã ããï¼
ã¾ã¨ã
æåããã¦ã£ã³ãã¦ã®ã¿ã¤ãã«ãå®è¡ä¸ã³ãã³ãã«ãªã£ã¦ããããã©ã«ãã§çµæ§ä¾¿å©ã«ãªã£ã¦ãããã«ã¹ã¿ãã¤ãºãscreenã«æ¯ã¹ã¦ç°¡å(screen使ã£ãå¾ã§æ
£ãã¦ãããããããã¾ããã)ã ã£ãã®ã§å¥½å°è±¡ã
ä½ããå½ç¶ãªããscreenããæ¯ãã¦ç¡ãã®ã§ãä¸è¨ã®ãããªåé¡ç¹ãæ®ãã¨å®æ度ã¯ããã¡ãã£ã¨ç¡ãã¨å®å¿ãã¦ç§»è¡ã§ããªãããã
screenã極ãã¦ãããã§ã¯ç¡ãã§ãããé »ç¹ã«ä½¿ãæ©è½ã«çµãã¨screenã§ã§ããªãäºãè¦ããããªãã®ã¯äºå®ã
ã¨ãããã¨ã§screenã使ãããªãã¦ãã人ãä»ç¡çã«ç§»è¡ããå¿
è¦ã¯ããã¾ããããæ£ç´^^);
screenç³»ã®ã¢ããªèªä½ãä»ãã使ã人ãæ°ãããã®ãããªãã¨ã¬ãã³ã§ããªã人ã¯ä½¿ãã¨å¹¸ãã«ãªããããã