diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-05-02 06:47:07 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-05-02 06:47:07 +0900 |
| commit | 09b8483ed67d3b85e983ef86c34260081975e1cb (patch) | |
| tree | 724871a9c2db964fca535e1d1fc644325b1edda3 /vhosts/blog/public/posts/2021-10-02/vim-swap-order-of-selected-lines | |
| parent | 742ee8ed6d300318089b6ae050dc123a88c85b4a (diff) | |
| download | nsfisis.dev-09b8483ed67d3b85e983ef86c34260081975e1cb.tar.gz nsfisis.dev-09b8483ed67d3b85e983ef86c34260081975e1cb.tar.zst nsfisis.dev-09b8483ed67d3b85e983ef86c34260081975e1cb.zip | |
fix(blog/nuldoc): remove unnecessary "language" attribute
Diffstat (limited to 'vhosts/blog/public/posts/2021-10-02/vim-swap-order-of-selected-lines')
| -rw-r--r-- | vhosts/blog/public/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vhosts/blog/public/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html b/vhosts/blog/public/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html index 1ccc0513..3da75e76 100644 --- a/vhosts/blog/public/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html +++ b/vhosts/blog/public/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html @@ -69,7 +69,7 @@ </div> <section id="section--tl-dr"> <h2><a href="#section--tl-dr">TL; DR</a></h2> - <div class="codeblock" language="vim"> + <div class="codeblock"> <pre class="shiki github-light" style="background-color:#f5f5f5;color:#24292e" tabindex="0"><code><span class="line"><span style="color:#6A737D">" License: Public Domain</span></span> <span class="line"></span> <span class="line"><span style="color:#D73A49">command!</span><span style="color:#24292E"> -bar -</span><span style="color:#D73A49">range=</span><span style="color:#24292E">%</span></span> @@ -131,7 +131,7 @@ <p> なお、<code>:g/^/m0</code> は全ての行を入れ替えるが、<code>:N,Mg/^/mN-1</code> とすることで N行目から M行目を処理範囲とするよう拡張できる。手でこれを入力するわけにはいかないので、次のようなコマンドを用意する。 </p> - <div class="codeblock" language="vim"> + <div class="codeblock"> <pre class="shiki github-light" style="background-color:#f5f5f5;color:#24292e" tabindex="0"><code><span class="line"><span style="color:#D73A49">command!</span><span style="color:#24292E"> -bar -</span><span style="color:#D73A49">range=</span><span style="color:#24292E">%</span></span> <span class="line"><span style="color:#D73A49"> \</span><span style="color:#24292E"> Reverse</span></span> <span class="line"><span style="color:#D73A49"> \</span><span style="color:#24292E"> <line1>,<line2>g</span><span style="color:#032F62">/^/</span><span style="color:#24292E">m<line1>-</span><span style="color:#005CC5">1</span></span></code></pre> @@ -167,7 +167,7 @@ <p> 前述した <code>:Reverse</code> コマンドの定義を少し変えて、次のようにする: </p> - <div class="codeblock" language="vim"> + <div class="codeblock"> <pre class="shiki github-light" style="background-color:#f5f5f5;color:#24292e" tabindex="0"><code><span class="line"><span style="color:#D73A49">function!</span><span style="color:#6F42C1"> s:reverse_lines</span><span style="color:#24292E">(from, </span><span style="color:#005CC5">to</span><span style="color:#24292E">) </span><span style="color:#D73A49">abort</span></span> <span class="line"><span style="color:#005CC5"> execute</span><span style="color:#6F42C1"> printf</span><span style="color:#24292E">(</span><span style="color:#032F62">"%d,%dg/^/m%d"</span><span style="color:#24292E">, a:from, a:to, a:from</span><span style="color:#D73A49"> - </span><span style="color:#005CC5">1</span><span style="color:#24292E">)</span></span> <span class="line"><span style="color:#D73A49">endfunction</span></span> @@ -220,7 +220,7 @@ </p> </div> </div> - <div class="codeblock" language="vim"> + <div class="codeblock"> <pre class="shiki github-light" style="background-color:#f5f5f5;color:#24292e" tabindex="0"><code><span class="line"><span style="color:#D73A49">command!</span><span style="color:#24292E"> -bar -</span><span style="color:#D73A49">range=</span><span style="color:#24292E">%</span></span> <span class="line"><span style="color:#D73A49"> \</span><span style="color:#24292E"> Reverse</span></span> <span class="line"><span style="color:#D73A49"> \</span><span style="color:#24292E"> keeppatterns <line1>,<line2>g</span><span style="color:#032F62">/^/</span><span style="color:#24292E">m<line1>-</span><span style="color:#005CC5">1</span></span></code></pre> |
