{"id":48727,"date":"2017-04-17T07:56:45","date_gmt":"2017-04-16T22:56:45","guid":{"rendered":"http:\/\/www.softantenna.com\/wp\/?p=48727"},"modified":"2017-04-17T07:56:45","modified_gmt":"2017-04-16T22:56:45","slug":"textbringer","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/textbringer\/","title":{"rendered":"Textbringer - Ruby\u3067\u4f5c\u3089\u308c\u305fEmacs\u30e9\u30a4\u30af\u306a\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf"},"content":{"rendered":"<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2017\/04\/Is-2017-04-13-15.16.21.jpg\" alt=\"S 2017 04 13 15 16 21\" title=\"s 2017-04-13 15.16.21.jpg\" border=\"0\" width=\"844\" height=\"592\" \/><\/p>\n<p>\u4e16\u754c\u4e2d\u306b\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u306f\u591a\u6570\u5b58\u5728\u3057\u307e\u3059\u304c\u3001\u958b\u767a\u8005\u306b\u3068\u3063\u3066\u306f\u81ea\u5206\u306e\u5f97\u610f\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u308b\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u304c\u3001\u771f\u306b\u4f7f\u3044\u3084\u3059\u3044\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3068\u3044\u3048\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u672c\u65e5\u7d39\u4ecb\u3059\u308b\u300c<a href=\"https:\/\/github.com\/shugo\/textbringer\">Textbringer<\/a>\u300d\u306f\u3001\u306a\u304b\u3067\u3082Ruby\u958b\u767a\u8005\u306e\u5922\u3092\u53f6\u3048\u3066\u304f\u308c\u308b\u30bf\u30fc\u30df\u30ca\u30eb\u30d9\u30fc\u30b9\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u3059\u3002<\/p>\n<p>Ruby\u958b\u767a\u8005\u3068\u3057\u3066\u6709\u540d\u306a\u524d\u7530\u4fee\u543e\u6c0f\u306b\u3088\u3063\u3066\u958b\u767a\u4e2d\u306eRuby\u88fd\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067(<a href=\"https:\/\/github.com\/shugo\/oedo06\/blob\/master\/textbringer.md\">\u8cc7\u6599<\/a>\u3001<a href=\"https:\/\/shugo.net\/jit\/20170320.html\">\u30d6\u30ed\u30b0<\/a>)\u3001Emacs\u98a8\u306e\u30ad\u30fc\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u304c\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6700\u7d42\u7684\u306a\u76ee\u6a19\u306fMUA(\u30e1\u30fc\u30eb\u30e6\u30fc\u30b6\u30fc\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8)\u306e\u5b9f\u88c5\u306b\u3042\u308b\u3068\u306e\u3053\u3068\u306a\u306e\u3067\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u30d9\u30fc\u30b9\u306e\u30e1\u30fc\u30eb\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u63a2\u3057\u3066\u3044\u308b\u65b9\u306b\u3068\u3063\u3066\u3082\u8981\u6ce8\u76ee\u306e\u30d7\u30ed\u30c0\u30af\u30c8\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u4ee5\u4e0b\u4f7f\u7528\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>Textbringer\u306e\u4f7f\u7528\u65b9\u6cd5<\/h2>\n<p>Ruby\u306e\u5b9f\u884c\u74b0\u5883\u304c\u3042\u308c\u3070gem\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059(macOS\u3067\u78ba\u8a8d)\u3002<\/p>\n<pre>\n$ gem install textbringer\n<\/pre>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u7acb\u3061\u4e0a\u3052\u300ctextbringer\u300d\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u30ad\u30fc\u30d0\u30a4\u30f3\u30c9\u306fEmacs\u306b\u6e96\u62e0\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u4f8b\u3048\u3070\u300cC-x C-f\u300d\u3092\u62bc\u305b\u3070\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f\u300c~\/.textbringer.rb\u300d\u3067\u3059\u3002<\/p>\n<pre><code class=\"ruby\">define_command(:test) {\n  insert(\"\u30c6\u30b9\u30c8\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3057\u305f\")\n  Utils::message(\"\u30df\u30cb\u30d0\u30c3\u30d5\u30a1\u3067\u3059\")\n}\n\ndefine_command(:fizzbuzz,\n               doc: \"Do FizzBuzz from 1 to n.\") do\n  |n = number_prefix_arg|\n  (1..n).each do |i|\n    insert [\"Fizz\"][i%3]\n    insert [\"Buzz\"][i%5]\n    insert i if beginning_of_line?\n    newline\n  end\nend\n<\/code><\/pre>\n<p>~\/.textbringer.rb\u306fRuby\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u3057\u3066\u5b9f\u884c\u3055\u308c\u3001define_command\u306b\u3088\u3063\u3066\u30ab\u30b9\u30bf\u30e0\u30b3\u30de\u30f3\u30c9\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u306fEmacs\u3068\u540c\u69d8\u300cM-x \u30b3\u30de\u30f3\u30c9\u540d\u300d\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2017\/04\/Is_20170413_151649.jpg\" alt=\"S 20170413 151649\" title=\"s_20170413_151649.jpg\" border=\"0\" width=\"845\" height=\"365\" \/><\/p>\n<p>\u25b2\u300cM-x test\u300d\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u30ab\u30ec\u30f3\u30c8\u30d0\u30c3\u30d5\u30a1\u306b\u6587\u5b57\u5217\u304c\u633f\u5165\u3055\u308c\u3066\u3001\u30df\u30cb\u30d0\u30c3\u30d5\u30a1\u306b\u3082\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2017\/04\/Is_20170413_153515.jpg\" alt=\"S 20170413 153515\" title=\"s_20170413_153515.jpg\" border=\"0\" width=\"851\" height=\"417\" \/><\/p>\n<p>\u25b2\u300cC-u 100 M-x fizzbuzz\u300d\u3092\u5b9f\u884c\u3059\u308b\u30681\u301c100\u306e\u9593\u3067FizzBuzz\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306bTextbringer\u306e\u6a5f\u80fd\u306fRuby\u3092\u4f7f\u3063\u3066\u81ea\u7531\u306b\u62e1\u5f35\u3057\u3066\u3044\u3051\u308b\u306e\u3067\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Textbringer\u306f\u73fe\u5728\u958b\u767a\u4e2d\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u64cd\u4f5c\u65b9\u6cd5\u3084\u30de\u30af\u30ed\u6a5f\u80fd\u306a\u3069\u5404\u7a2e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u307e\u3060\u5b58\u5728\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\u3002\u3068\u306f\u3044\u3048\u64cd\u4f5c\u65b9\u6cd5\u306fEmacs\u30e6\u30fc\u30b6\u30fc\u306b\u306f\u306a\u3058\u307f\u3084\u3059\u304f\u3001\u65e5\u672c\u8a9e\u306b\u95a2\u3059\u308b\u554f\u984c\u3082\u5b58\u5728\u3057\u307e\u305b\u3093\u306e\u3067\u3001Ruby\u3068Emacs\u306b\u8208\u5473\u306e\u3042\u308b\u958b\u767a\u8005\u306a\u3089\u3070\u4f7f\u3063\u3066\u307f\u3066\u640d\u306f\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u304aTextbringer\u3068\u3044\u3046\u540d\u524d\u306f\u3001\u30de\u30a4\u30b1\u30eb\u30fb\u30e0\u30a2\u30b3\u30c3\u30af\u306e\u30d5\u30a1\u30f3\u30bf\u30b8\u30fc\u5c0f\u8aac\u30a8\u30eb\u30ea\u30c3\u30af\u30b5\u30fc\u30ac\u30b7\u30ea\u30fc\u30ba\u306b\u767b\u5834\u3059\u308b\u9b54\u5263\u300c\u30b9\u30c8\u30fc\u30e0\u30d6\u30ea\u30f3\u30ac\u30fc\u300d\u306b\u30a4\u30f3\u30b9\u30d1\u30a4\u30a2\u3055\u308c\u3066\u3044\u308b\u6a21\u69d8\u3002<\/p>\n<p>Textbringer\u304c\u30b9\u30c8\u30fc\u30e0\u30d6\u30ea\u30f3\u30ac\u30fc\u306e\u3088\u3046\u306b\u5727\u5012\u7684\u306a\u529b\u3092\u6301\u3064\u3053\u3068\u306b\u306a\u308b\u306e\u304b\u6ce8\u76ee\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e16\u754c\u4e2d\u306b\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u306f\u591a\u6570\u5b58\u5728\u3057\u307e\u3059\u304c\u3001\u958b\u767a\u8005\u306b\u3068\u3063\u3066\u306f\u81ea\u5206\u306e\u5f97\u610f\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u308b\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u304c\u3001\u771f\u306b\u4f7f\u3044\u3084\u3059\u3044\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3068\u3044\u3048\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 \u672c\u65e5\u7d39\u4ecb\u3059\u308b\u300cTextbringe [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":48805,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[3459],"tags":[199,154],"class_list":["post-48727","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-review","tag-emacs","tag-ruby"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/48727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=48727"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/48727\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/48805"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=48727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=48727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=48727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}