neovim: more tricks
parent
0a282cf13e
commit
443419a9a9
|
@ -82,6 +82,10 @@
|
||||||
|
|
||||||
:<span class="pl-c1">v</span><span class="pl-sr">/word/</span><span class="pl-c1">d</span></pre>
|
:<span class="pl-c1">v</span><span class="pl-sr">/word/</span><span class="pl-c1">d</span></pre>
|
||||||
</div>
|
</div>
|
||||||
|
<p>Play macro (after selecting lines):</p>
|
||||||
|
<div class="highlight highlight-source-viml">
|
||||||
|
<pre>:norm<span class="pl-k">!</span> <span class="pl-smi">@a</span></pre>
|
||||||
|
</div>
|
||||||
<p>Sort lines (after selecting lines):</p>
|
<p>Sort lines (after selecting lines):</p>
|
||||||
<div class="highlight highlight-source-viml">
|
<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>
|
<pre>:<span class="pl-c1">sort</span> <span class="pl-k">-</span><span class="pl-c1">u</span></pre>
|
||||||
|
@ -327,6 +331,7 @@ vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span clas
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><code><Space>e</code>: float diagnostic</li>
|
||||||
<li><code><Space>d</code>: go to definition</li>
|
<li><code><Space>d</code>: go to definition</li>
|
||||||
<li><code><Space>k</code>: hover</li>
|
<li><code><Space>k</code>: hover</li>
|
||||||
<li><code><F2></code>: rename</li>
|
<li><code><F2></code>: rename</li>
|
||||||
|
|
|
@ -34,6 +34,12 @@ Delete all lines **not** contain word:
|
||||||
:v/word/d
|
:v/word/d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Play macro (after selecting lines):
|
||||||
|
|
||||||
|
```vim
|
||||||
|
:norm! @a
|
||||||
|
```
|
||||||
|
|
||||||
Sort lines (after selecting lines):
|
Sort lines (after selecting lines):
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
|
@ -144,6 +150,7 @@ vim.keymap.set("n", "q", ":q<CR>")
|
||||||
- `vif`, `vaf`: select inner/outer function
|
- `vif`, `vaf`: select inner/outer function
|
||||||
- `vic`, `vac`: select inner/outer class
|
- `vic`, `vac`: select inner/outer class
|
||||||
- With [neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
|
- With [neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
|
||||||
|
- `<Space>e`: float diagnostic
|
||||||
- `<Space>d`: go to definition
|
- `<Space>d`: go to definition
|
||||||
- `<Space>k`: hover
|
- `<Space>k`: hover
|
||||||
- `<F2>`: rename
|
- `<F2>`: rename
|
||||||
|
|
Loading…
Reference in New Issue