aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/posts/2021-10-02/vim-swap-order-of-selected-lines
diff options
context:
space:
mode:
Diffstat (limited to 'public/posts/2021-10-02/vim-swap-order-of-selected-lines')
-rw-r--r--public/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/public/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html b/public/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html
index afe6ba9..8a3b304 100644
--- a/public/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html
+++ b/public/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html
@@ -115,7 +115,7 @@
なお、<code>:g/^/m0</code>は全ての行を入れ替えるが、<code>:N,Mg/^/mN-1</code>とすることで N行目から M行目を処理範囲とするよう拡張できる。手でこれを入力するわけにはいかないので、次のようなコマンドを用意する。
</p>
- <pre language="vim" linenumbering="unnumbered">
+ <pre class="highlight" language="vim" linenumbering="unnumbered">
<code>command! -bar -range=%
\ Reverse
\ &lt;line1&gt;,&lt;line2&gt;g/^/m&lt;line1&gt;-1</code>
@@ -152,7 +152,7 @@
前述した<code>:Reverse</code>コマンドの定義を少し変えて、次のようにする:
</p>
- <pre language="vim" linenumbering="unnumbered">
+ <pre class="highlight" language="vim" linenumbering="unnumbered">
<code>function! s:reverse_lines(from, to) abort
execute printf(&quot;%d,%dg/^/m%d&quot;, a:from, a:to, a:from - 1)
endfunction
@@ -211,7 +211,7 @@
</p>
</blockquote>
- <pre language="vim" linenumbering="unnumbered">
+ <pre class="highlight" language="vim" linenumbering="unnumbered">
<code>command! -bar -range=%
\ Reverse
\ keeppatterns &lt;line1&gt;,&lt;line2&gt;g/^/m&lt;line1&gt;-1</code>
@@ -230,7 +230,7 @@
<section id="section--_コピペ用再掲">
<h2><a href="#section--_コピペ用再掲">コピペ用再掲</a></h2>
- <pre language="vim" linenumbering="unnumbered">
+ <pre class="highlight" language="vim" linenumbering="unnumbered">
<code>&quot; License: Public Domain
command! -bar -range=%