狠狠撸

狠狠撸Share a Scribd company logo
コンピュータ時代の詠唱魔法
@tokoro10g
2017年12月3日
#伝道師になろう 最終回
@tokoro10g コンピュータ時代の詠唱魔法
1/17
自己紹介
@tokoro10g (ところたん)
? 工学系(制御理論)の博士後期課程1年
? すき :
? 制御理論
? Arch Linux, i3wm, Vim, STM32
? 小さくて賢い 女の子 ロボット
@tokoro10g コンピュータ時代の詠唱魔法
2/17
なぜ詠唱魔法か?
@tokoro10g コンピュータ時代の詠唱魔法
3/17
なぜ詠唱魔法か?
@tokoro10g コンピュータ時代の詠唱魔法
3/17
なぜ詠唱魔法か?
@tokoro10g コンピュータ時代の詠唱魔法
3/17
※関係ありません
ではなぜ詠唱魔法か?
出典: アニメ『聖剣使いの禁呪詠唱』第1話「転生せし者 -The Reincarnater-」より
@tokoro10g コンピュータ時代の詠唱魔法
4/17
ではなぜ詠唱魔法か?
出典: アニメ『ソードアート?オンライン』第19話「ルグルー回廊」より
@tokoro10g コンピュータ時代の詠唱魔法
5/17
なんで……どうして……詠唱魔法か?
@tokoro10g コンピュータ時代の詠唱魔法
6/17
なんで……どうして……詠唱魔法か?
なんかよくわからないことを
ブツブツ言って
なんかよくわからないものが
発動するのって
なんかかっこいいですよね?
@tokoro10g コンピュータ時代の詠唱魔法
6/17
現代における魔法
基本的に…
? ファンタジー創作の材料
? 過去の遺物
などと捉えられがち
@tokoro10g コンピュータ時代の詠唱魔法
7/17
現代における魔法
基本的に…
? ファンタジー創作の材料
? 過去の遺物
などと捉えられがち
実は…
? 詠唱魔法はコンピュータの世界で現役
? みなさんも明日,いや今日から使える
@tokoro10g コンピュータ時代の詠唱魔法
7/17
現代における魔法
基本的に…
? ファンタジー創作の材料
? 過去の遺物
などと捉えられがち
実は…
? 詠唱魔法はコンピュータの世界で現役
? みなさんも明日,いや今日から使える
詠唱魔術師になろう!!
@tokoro10g コンピュータ時代の詠唱魔法
7/17
使用するもの
1. Windows/Mac/Linux/その他諸々OSが動くコンピュータ
2. Vimというテキストエディタ
Vimでは,魔法(キー操作の組み合わせ)を唱えることで
テキストを編集する
@tokoro10g コンピュータ時代の詠唱魔法
8/17
Vimでの魔法の一例
? YP
行をコピーしてその上に貼り付け
? gg=G
テキスト全体の行頭をいい感じに揃える
? V3j~
下向きに4行選択して大文字?小文字を反転する
? V5"=range(1,5)<Enter>p
1?5の数字を1行ずつ出力するのを5回繰り返す
? "=range(543)<Ctrl+m>P:%normal VEEkdYo@0D@.
<Crtl+o>@.<Ctrl+m>dZZ
素数を100個列挙する
@tokoro10g コンピュータ時代の詠唱魔法
9/17
やさしい魔法の唱え方(1) モード
? ノーマルモード
基本となるモード
? インサートモード
文字列を入力するモード
? コマンドモード
ノーマルよりも複雑なコマンドを実行するモード
? ビジュアルモード
テキストを選択して処理するモード
基本はノーマルモード
キー操作でモードを切り替えながら編集する
@tokoro10g コンピュータ時代の詠唱魔法
10/17
やさしい魔法の唱え方(2) モーション
? h, j, k, l
左, 下, 上, 右 (DDRと同じ!)
? w, b
1単語進む/戻る
? ^, $
行頭/行末に飛ぶ
? <Ctrl+f>, <Ctrl+b>, <Ctrl+d>, <Ctrl+u>
1ページ進む/戻る, 半ページ進む/戻る
? gg, G
ファイルの先頭/末尾行に飛ぶ
? f[文字]
指定した文字が次に現れる箇所まで飛ぶ
などなど…
@tokoro10g コンピュータ時代の詠唱魔法
11/17
やさしい魔法の唱え方(3) オペレータとモーション
基本構造: [回数] [オペレータ]
処理方法
[モーション]
処理対象
@tokoro10g コンピュータ時代の詠唱魔法
12/17
やさしい魔法の唱え方(3) オペレータとモーション
オペレータの例
? d: 削除 (delete)
? c: 削除した上でインサートモードに入る (change)
? y: コピー (yank)
実用例
? d$ : 行末まで削除
? cfy : つぎに‘y’が現れるところまでを変更
? 2cw = c2w : 2単語変更
? 2d3w : 6単語削除
? c4fy = 4cfy : ‘y’が4番目に現れるところまでを変更
? yi( : ()の中をコピー (少し特殊なモーション)
基本構造: [回数][オペレータ][モーション]
@tokoro10g コンピュータ時代の詠唱魔法
13/17
やさしい魔法の唱え方(4) 実際の例
詳しくは… Vimに付属のVimtutor(チュートリアル)を参照
@tokoro10g コンピュータ時代の詠唱魔法
14/17
そもそもなぜこんなものが生まれたのか? - Vimの歴史
ed – the standard text editor (1969, Ken Thompson)
↓ ブラウン管ディスプレイの普及,機能強化
em – editor for mortals (1976, Charles Haley)
↓ 高速化
ex – extended (1976, Bill Joy)
↓ ビジュアルモードを分離
vi – visual editor
↓ 機能強化
Vim – Vi IMproved (1992, Bram Moolenaar)
↓ 現代的に再実装?機能強化
NeoVim (2015)
@tokoro10g コンピュータ時代の詠唱魔法
15/17
上級魔術師になろう - VimGolf
指定された入力文字列から出力文字列を作るゲーム.
詠唱の短さ(キーを押す回数の少なさ)を競う.
@tokoro10g コンピュータ時代の詠唱魔法
16/17
上級魔術師になろう - VimGolf
指定された入力文字列から出力文字列を作るゲーム.
詠唱の短さ(キーを押す回数の少なさ)を競う.
? わたしの解答
6GYp<C-a>l11<C-a>3joNew te<C-n>.<Enter><Esc>ZZ
(24keys)
? トップの解答
Yp<C-a>l11.GONew te<C-n>.<Enter><Esc>ZZ
(22keys)
@tokoro10g コンピュータ時代の詠唱魔法
16/17
まとめ
? 詠唱魔法を感じながらコーディング/執筆ができるのは,
Vimならではの特徴!
? あなたも今日から詠唱魔術師になろう!
@tokoro10g コンピュータ時代の詠唱魔法
17/17
Ad

Recommended

蝉辞谤补肠辞尘とわたしの一年
蝉辞谤补肠辞尘とわたしの一年
K K
?
たのしいかたつむり讲座痴辞濒2
たのしいかたつむり讲座痴辞濒2
riku Urata
?
マイクロマウスのための MATLAB/Simulink 講座 第1回 - MATLAB入門
マイクロマウスのための MATLAB/Simulink 講座 第1回 - MATLAB入門
Teng Tokoro
?
惭础罢尝础叠の3顿プロットを简単にする
惭础罢尝础叠の3顿プロットを简単にする
Teng Tokoro
?
グローバル理工人材のための今日から使える検索テクニック ―もう日本语でググるのはやめよう
グローバル理工人材のための今日から使える検索テクニック ―もう日本语でググるのはやめよう
Teng Tokoro
?
小さくて贤いロボット『マイクロマウス』を作ろう!
小さくて贤いロボット『マイクロマウス』を作ろう!
Teng Tokoro
?
これまでの制作物いろいろ+ Quadruptor
これまでの制作物いろいろ+ Quadruptor
Teng Tokoro
?
超小型クアッドロータ "Quadruptor" の製作とその制御
超小型クアッドロータ "Quadruptor" の製作とその制御
Teng Tokoro
?
2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
?
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
?
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
?
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
?
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
?
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
?
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
?
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
?
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
?
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
?
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
?
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
?
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
?
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
?
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
?
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
?
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
?
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
?
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
?
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
?

More Related Content

Featured (20)

2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
?
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
?
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
?
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
?
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
?
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
?
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
?
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
?
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
?
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
?
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
?
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
?
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
?
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
?
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
?
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
?
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
?
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
?
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
?
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
?
2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
?
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
?
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
?
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
?
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
?
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
?
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
?
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
?
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
?
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
?
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
?
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
?
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
?
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
?
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
?
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
?

コンピュータ時代の詠唱魔法 #伝道師になろう 最終回