diff options
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.html | 8 |
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 \ <line1>,<line2>g/^/m<line1>-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("%d,%dg/^/m%d", 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 <line1>,<line2>g/^/m<line1>-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>" License: Public Domain command! -bar -range=% |
