vi.html (1910B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <meta name="viewport" content="width=device-width,initial-scale=1"> 6 <link rel="stylesheet" type="text/css" href="/style.css"> 7 <link rel="icon" type="image/x-icon" href="/pics/favicon.ico"> 8 <title>vi -- テキストエディタ</title> 9 </head> 10 <body> 11 <header> 12 <a href="/">主頁</a> | 13 <a href="/about.html">自己紹介</a> | 14 <a href="/journal">日記</a> | 15 <a href="/farm">農業</a> | 16 <a href="/kitchen">台所</a> | 17 <a href="/computer">電算機</a> | 18 <a href="/poetry">詩</a> | 19 <a href="/books">本棚</a> | 20 <a href="/gallery">絵</a> | 21 <a href="/plant">植物</a> | 22 <a href="https://git.mtkn.jp">Git</a> 23 </header> 24 <main> 25 <article> 26 <h1>vi -- テキストエディタ</h1> 27 <time>2024-10-27</time> 28 <h2>コマンドの実行</h2> 29 <p> 30 バッファにコピーした任意のテキストをコマンドとして実行できる。</p> 31 <ul> 32 <li> 33 コマンドをどこかの行に入力。 34 </li> 35 <li> 36 コマンドをバッファ<code>q</code>へコピー: 37 <code>0"qy$ 38 </code> 39 </li> 40 <li> 41 バッファ<code>q</code>内のコマンドを実行: 42 <code>@q 43 </code> 44 </li> 45 </ul> 46 <p> 47 例えば単語をhtmlの<code>code</code>タグで囲むコマンド: <pre><code>i<code><u><ctrl-v><esc></u>lea</code><u><ctrl-v><esc></u> 48 </code></pre> 49 をどこかに入力し、その行でコマンドモードに移行し、<code>0"qy$</code>とすると<code>q</code>バッファに上のコマンドがコピーされるので、<code>code</code>タグで囲みたい単語の先頭に移動し、<code>@q</code>と入力するとその単語が<code>code</code>タグで囲まれる。 50 51 </article> 52 53 </main> 54 <footer> 55 <address>info(at)mtkn(dot)jp</address> 56 <a href="http://creativecommons.org/publicdomain/zero/1.0?ref=chooser-v1" rel="license noopener noreferrer">CC0 1.0</a> 57 </footer> 58 </body> 59 </html>