{"id":1729,"date":"2017-12-07T11:00:07","date_gmt":"2017-12-07T02:00:07","guid":{"rendered":"https:\/\/blog.timecrowd.net\/?p=1729"},"modified":"2017-11-30T18:13:46","modified_gmt":"2017-11-30T09:13:46","slug":"update-tmux-to-2-6","status":"publish","type":"post","link":"https:\/\/blog.timecrowd.net\/update-tmux-to-2-6\/","title":{"rendered":"tmux\u30922.6\u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u30b3\u30d4\u30fc\u304c\u3067\u304d\u306a\u304f\u306a\u308b"},"content":{"rendered":"<p>\u7686\u3055\u3093\u306f\u958b\u767a\u6642\u306b\u3069\u306e\u3088\u3046\u306a\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u3044\u308b\u3067\u3057\u3087\u3046\u304b\uff1f\u79c1\u306fCUI\u6d3e\u3067\u9577\u3089\u304fvim+tmux\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5148\u65e5\u3001tmux\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u3053\u3067\u767a\u751f\u3057\u305f\u554f\u984c\u3068\u89e3\u6c7a\u7b56\u3092\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u65c5\u3059\u308b\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u4e09\u5b85\u3067\u3059\u3002\u5148\u9031\u672b\u306f\u304a\u4f11\u307f\u3092\u3044\u305f\u3060\u3044\u3066\u798f\u4e95\u3078\u884c\u3063\u3066\u304d\u307e\u3057\u305f\u3002\u30bd\u30fc\u30b9\u30ab\u30c4\u4e3c\u304c\u7f8e\u5473\u3057\u304f\u30664\u65e5\u306e\u3046\u30613\u65e5\u306f\u30bd\u30fc\u30b9\u30ab\u30c4\u4e3c\u3092\u98df\u3079\u307e\u3057\u305f\u3002<\/p>\n<p>\u904a\u3093\u3067\u3070\u304b\u308a\u3044\u308b\u3088\u3046\u306b\u601d\u308f\u308c\u308b\u3068\u56f0\u308b\u306e\u3067\u3001\u4eca\u56de\u306f\u30a8\u30f3\u30b8\u30cb\u30a2\u3089\u3057\u3044\u8a71\u984c\u3067\u3059\u3002<\/p>\n<div id=\"toc_container\" class=\"toc_white no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#tmux\"><span class=\"toc_number toc_depth_1\">1<\/span> \u4f55\u6c17\u306a\u304ftmux\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8<\/a><\/li><li><a href=\"#tmuxcopy-mode\"><span class=\"toc_number toc_depth_1\">2<\/span> tmux\u304c\u30a8\u30e9\u30fc\u3092\u5410\u304dcopy-mode\u304c\u52d5\u304b\u306a\u304f\u306a\u308b<\/a><\/li><li><a href=\"#tmuxinator8230\"><span class=\"toc_number toc_depth_1\">3<\/span> tmuxinator\u304c\u4f7f\u3048\u306a\u304f\u306a\u3063\u305f&#8230;\u3068\u601d\u3063\u305f\u3089<\/a><\/li><li><a href=\"#tmux-resurrect\"><span class=\"toc_number toc_depth_1\">4<\/span> tmux-resurrect\u306e\u5c0e\u5165<\/a><\/li><li><a href=\"#i\"><span class=\"toc_number toc_depth_1\">5<\/span> \u307e\u3068\u3081<\/a><\/li><\/ul><\/div>\n<h2><span id=\"tmux\">\u4f55\u6c17\u306a\u304ftmux\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8<\/span><\/h2>\n<p>11\u6708\u306b\u5165\u3063\u3066OS\u3092macOS High Sierra\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u969b\u306b\u3001\u3069\u3046\u3082vim\u306e\u30b7\u30f3\u30bf\u30c3\u30af\u30b9\u30cf\u30a4\u30e9\u30a4\u30c8\u306e\u63cf\u753b\u304c\u602a\u3057\u304f\u306a\u308a\u3001\u3068\u308a\u3042\u3048\u305a\u3001\u307e\u305a\u306fvim\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u3067\u3082\u3069\u3046\u306b\u3082\u4e0d\u5b89\u5b9a\u306a\u306e\u3067\u3001\u95a2\u4fc2\u3057\u3066\u3044\u308b\u3068\u3057\u305f\u3089tmux\u3067\u306f\u306a\u3044\u304b\u3068\u3044\u3046\u3053\u3068\u3067\u6700\u65b0\u7248\u306e2.6\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre><code>$ brew upgrade tmux<\/code><\/pre>\n<h2><span id=\"tmuxcopy-mode\">tmux\u304c\u30a8\u30e9\u30fc\u3092\u5410\u304dcopy-mode\u304c\u52d5\u304b\u306a\u304f\u306a\u308b<\/span><\/h2>\n<p>\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u304c\u7121\u4e8b\u7d42\u4e86\u3057\u305f\u306e\u3067\u7acb\u3061\u4e0a\u3052\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u3092\u5410\u304f\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre><code>\/Users\/kotamiyake\/.tmux.conf:12: usage: bind-key [-cnr] [-T key-table] key command [arguments] [0\/0]0\/0]\r\n\/Users\/kotamiyake\/.tmux.conf:13: usage: bind-key [-cnr] [-T key-table] key command [arguments] \r\n\/Users\/kotamiyake\/.tmux.conf:16: usage: unbind-key [-an] [-T key-table] key \r\n\/Users\/kotamiyake\/.tmux.conf:17: usage: bind-key [-cnr] [-T key-table] key command [arguments]<\/code><\/pre>\n<p>\u3068\u308a\u3042\u3048\u305a\u8d77\u52d5\u306f\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u30b3\u30d4\u30fc\u3057\u305f\u5185\u5bb9\u304c\u3046\u307e\u304f\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u4fdd\u5b58\u3055\u308c\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u306f\u4e0d\u4fbf\u3068\u3044\u3046\u3053\u3068\u3067\u3001Google\u3067\u691c\u7d22\u3057\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u898b\u3064\u3051\u307e\u3057\u305f\u3002<\/p>\n<div class=\"linkcard\"><div class=\"lkc-external-wrap\"><a class=\"no_icon\" href=\"https:\/\/qiita.com\/jyotti\/items\/5383d909f7307762fefa\" target=\"_blank\"><div class=\"lkc-card\"><div class=\"lkc-content\"><span class=\"lkc-thumbnail\"><img class=\"lkc-thumbnail-img\" src=\"https:\/\/s.wordpress.com\/mshots\/v1\/https%3A%2F%2Fqiita.com%2Fjyotti%2Fitems%2F5383d909f7307762fefa?w=100\" alt=\"\" \/><\/span><span class=\"lkc-title\">tmux2.4\u304b\u3089vi-copy\u304ccopy-mode\u306b\u5909\u308f\u3063\u3066\u3044\u305f - Qiita<\/span><div class=\"lkc-url\"><cite>https:\/\/qiita.com\/jyotti\/items\/5383d909f7307762fefa<\/cite><\/div><div class=\"lkc-excerpt\">tmux\u306e\u8a2d\u5b9a\u3092\u898b\u76f4\u3057\u4e2d\u3067\u672c\u5bb6\u306e\u30de\u30cb\u30e5\u30a2\u30eb\u3092\u5b9a\u671f\u7684\u306b\u898b\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u6700\u65b0\u7248\u306e`v2.5`\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u3066\u3044\u307e\u3059\u3002https:\/\/tmux.github.io\/\u4ee5\u524d\u306btmux\u3092`v2.1`\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u6642\u3001\u30de\u30a6\u30b9\u8a2d\u5b9a\u306e\u6319\u52d5...<\/div><\/div><div class=\"clear\"><\/div><\/div><\/a><\/div><\/div>\n<p>\u3069\u3046\u3084\u3089copy-mode\u306e\u8a2d\u5b9a\u304c\u5909\u308f\u3063\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u3057\u305f\u3002\u8a18\u4e8b\u306e\u901a\u308acopy-mode\u306e\u8a2d\u5b9a\u3092\u4fee\u6b63\u3057\u3066\u304b\u3089tmux\u3092\u8d77\u52d5\u3059\u308b\u3068\u30a8\u30e9\u30fc\u3092\u5410\u304b\u306a\u304f\u306a\u308a\u3001\u30b3\u30d4\u30fc\u3057\u305f\u5185\u5bb9\u304c\u3061\u3083\u3093\u3068\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u4fdd\u5b58\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>Before<\/p>\n<pre><code>bind-key -t vi-copy v begin-selection\r\nbind-key -t vi-copy y copy-pipe \"reattach-to-user-namespace pbcopy\"\r\nunbind -t vi-copy Enter\r\nbind-key -t vi-copy Enter copy-pipe \"reattach-to-user-namespace pbcopy\"<\/code><\/pre>\n<p>After<\/p>\n<pre><code>bind-key -T copy-mode-vi v send-keys -X begin-selection\r\nbind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel \"reattach-to-user-namespace pbcopy\"\r\nbind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel \"reattach-to-user-namespace pbcopy\"<\/code><\/pre>\n<h2><span id=\"tmuxinator8230\">tmuxinator\u304c\u4f7f\u3048\u306a\u304f\u306a\u3063\u305f&#8230;\u3068\u601d\u3063\u305f\u3089<\/span><\/h2>\n<p>tmuxinator\u304c\u4f7f\u3048\u306a\u304f\u306a\u3063\u305f\u306e\u3067\u3001\u4ee3\u308f\u308a\u306btmux-resurrect\u3092\u5c0e\u5165\u3059\u308b\u3068\u3044\u3046\u6d41\u308c\u306e\u3064\u3082\u308a\u304c\u3001\u5148\u7a0b\u8a66\u3057\u3066\u307f\u305f\u3089\u554f\u984c\u306a\u304f\u8d77\u52d5\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u3068\u306f\u8a00\u3048\u3001\u6c17\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u3053\u306etmux-resurrect\u3092\u5c0e\u5165\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>tmuxinator\u306f\u8a2d\u5b9a\u3057\u305f\u72b6\u614b\u306b\u623b\u3059\u3060\u3051\u3067\u3059\u304c\u3001tmux-resuccrect\u306f\u5143\u306e\u72b6\u614b\u306b\u5fa9\u5143\u3057\u3066\u304f\u308c\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<h2><span id=\"tmux-resurrect\">tmux-resurrect\u306e\u5c0e\u5165<\/span><\/h2>\n<p>README\u306b\u6cbf\u3063\u3066\u9032\u3081\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>Tmux Plugin Manager\u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308a\u3001\u305d\u3061\u3089\u3092\u5c0e\u5165\u3057\u305f\u307b\u3046\u304c\u826f\u3044\u3068\u3044\u3046\u3053\u3068\u3067\u3057\u305f\u3002<\/p>\n<h3>Tmux Plugin Manager\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p><a href=\"https:\/\/github.com\/tmux-plugins\/tpm\" target=\"_blank\" rel=\"noopener\">tmux-plugins\/tpm: Tmux Plugin Manager<\/a><\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u7c21\u5358\u3067git clone\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<pre><code>$ git clone https:\/\/github.com\/tmux-plugins\/tpm ~\/.tmux\/plugins\/tpm<\/code><\/pre>\n<p>\u305d\u308c\u304b\u3089\u4e0b\u8a18\u306e\u8a2d\u5b9a\u3092.tmux.conf\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre><code>set -g @plugin 'tmux-plugins\/tpm'\r\nrun '~\/.tmux\/plugins\/tpm\/tpm'<\/code><\/pre>\n<p>\u6700\u5f8c\u306b\u8a2d\u5b9a\u3092\u30ea\u30ed\u30fc\u30c9\u3057\u3066\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<pre><code>$ tmux source ~\/.tmux.conf<\/code><\/pre>\n<h3>tmux-resurrect\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p><a href=\"https:\/\/github.com\/tmux-plugins\/tmux-resurrect\" target=\"_blank\" rel=\"noopener\">tmux-plugins\/tmux-resurrect: Persists tmux environment across system restarts.<\/a><\/p>\n<p>\u4e0b\u8a18\u306e\u8a2d\u5b9a\u3092.tmux.conf\u306b\u8ffd\u8a18\u3057\u3066prefix+I\u3092\u5b9f\u884c\u3057\u3066\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<pre><code>set -g @plugin 'tmux-plugins\/tmux-resurrect'<\/code><\/pre>\n<p>\u3053\u308c\u3067tmux\u306e\u60c5\u5831\u3092\u4fdd\u5b58\u3001\u5fa9\u5143\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff01<\/p>\n<p>\u3081\u3067\u305f\u3057\u3081\u3067\u305f\u3057&#8230;\u3068\u601d\u3063\u305f\u3089\u3001\u3046\u307e\u304f\u52d5\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u3069\u3046\u3084\u3089\u30c7\u30d5\u30a9\u30eb\u30c8\u306ebind-key\u3068tmux-resurrect\u306ebind-key\u304c\u88ab\u3063\u3066\u3044\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u79c1\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u8003\u306b\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre><code>set -g @resurrect-save 'S'\r\nset -g @resurrect-restore 'R'<\/code><\/pre>\n<p><a href=\"https:\/\/github.com\/tmux-plugins\/tmux-resurrect\/blob\/master\/docs\/custom_key_bindings.md\" target=\"_blank\" rel=\"noopener\">tmux-resurrect\/custom_key_bindings.md at master \u00b7 tmux-plugins\/tmux-resurrect<\/a><\/p>\n<p>\u3053\u308c\u3067\u6674\u308c\u3066tmux-resurrect\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u5f8c\u306fPC\u518d\u8d77\u52d5\u306a\u3069\u3067\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u9589\u3058\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3068\u304d\u3067\u3082\u3001\u3055\u3055\u3063\u3068prefix-S\u3092\u6253\u3061\u8fbc\u3093\u3067\u3001\u518d\u8d77\u52d5\u5f8c\u306bprefix-R\u3092\u62bc\u305b\u3070\u5143\u306e\u74b0\u5883\u304c\u623b\u3063\u3066\u304f\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h2><span id=\"i\">\u307e\u3068\u3081<\/span><\/h2>\n<p>\u5f53\u7136\u306e\u3053\u3068\u3067\u3059\u304c\u3001\u30c4\u30fc\u30eb\u985e\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306b\u3064\u3044\u3066\u306f\u614e\u91cd\u306b\u884c\u308f\u306a\u304f\u3066\u306f\u3044\u3051\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u3092\u6539\u3081\u3066\u611f\u3058\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u3067\u3082\u65b0\u3057\u3044\u30c4\u30fc\u30eb\u3092\u8a66\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u306f\u308f\u304f\u308f\u304f\u3059\u308b\u306e\u3067\u3001\u4eca\u5f8c\u3082\u614e\u91cd\u306b\u306a\u308a\u3064\u3064\u3082\u958b\u767a\u74b0\u5883\u306e\u6539\u5584\u3092\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u7686\u3055\u3093\u306f\u958b\u767a\u6642\u306b\u3069\u306e\u3088\u3046\u306a\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u3044\u308b\u3067\u3057\u3087\u3046\u304b\uff1f\u79c1\u306fCUI\u6d3e\u3067\u9577\u3089\u304fvim+tmux\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u5148\u65e5\u3001tmux\u3092&#8230;","protected":false},"author":5,"featured_media":1741,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cybocfi_hide_featured_image":""},"categories":[5],"tags":[12],"_links":{"self":[{"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/posts\/1729"}],"collection":[{"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/comments?post=1729"}],"version-history":[{"count":11,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/posts\/1729\/revisions"}],"predecessor-version":[{"id":1746,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/posts\/1729\/revisions\/1746"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/media\/1741"}],"wp:attachment":[{"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/media?parent=1729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/categories?post=1729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/tags?post=1729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}