feat: add vim tricks
parent
ba13f993b7
commit
68eb372ca1
|
@ -74,6 +74,12 @@
|
|||
<div class="highlight highlight-source-viml">
|
||||
<pre>:<span class="pl-c1">g</span><span class="pl-sr">/word/</span><span class="pl-c1">d</span></pre>
|
||||
</div>
|
||||
<p>Delete all lines <strong>not</strong> contain word:</p>
|
||||
<div class="highlight highlight-source-viml">
|
||||
<pre>:<span class="pl-c1">g</span><span class="pl-k">!</span><span class="pl-sr">/word/</span><span class="pl-c1">d</span>
|
||||
|
||||
:<span class="pl-c1">v</span><span class="pl-sr">/word/</span><span class="pl-c1">d</span></pre>
|
||||
</div>
|
||||
<p>Sort lines (after selecting lines):</p>
|
||||
<div class="highlight highlight-source-viml">
|
||||
<pre>:<span class="pl-c1">sort</span> <span class="pl-k">-</span><span class="pl-c1">u</span></pre>
|
||||
|
|
|
@ -26,6 +26,14 @@ Delete all lines contain word:
|
|||
:g/word/d
|
||||
```
|
||||
|
||||
Delete all lines **not** contain word:
|
||||
|
||||
```vim
|
||||
:g!/word/d
|
||||
|
||||
:v/word/d
|
||||
```
|
||||
|
||||
Sort lines (after selecting lines):
|
||||
|
||||
```vim
|
||||
|
|
Loading…
Reference in New Issue