feat: zz to quickly center vim
parent
74fe61f598
commit
ea0f0b580b
|
@ -100,7 +100,12 @@
|
|||
<p>Use both <code>\</code> and <code>;</code> as leader key:</p>
|
||||
<div class="highlight highlight-source-lua">
|
||||
<pre>vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>;<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span><Leader><span class="pl-pds">"</span></span>, { remap <span class="pl-k">=</span> <span class="pl-c1">true</span> })
|
||||
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>'<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span><Leader><span class="pl-pds">"</span></span>, { remap <span class="pl-k">=</span> <span class="pl-c1">true</span> })
|
||||
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>'<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span><Leader><span class="pl-pds">"</span></span>, { remap <span class="pl-k">=</span> <span class="pl-c1">true</span> })</pre>
|
||||
</div>
|
||||
<p>Misc keymap:</p>
|
||||
<div class="highlight highlight-source-lua">
|
||||
<pre>vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>nzz<span class="pl-pds">"</span></span>)
|
||||
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>N<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>Nzz<span class="pl-pds">"</span></span>)
|
||||
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>q<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:q<CR><span class="pl-pds">"</span></span>)</pre>
|
||||
</div>
|
||||
<ul>
|
||||
|
|
|
@ -44,6 +44,13 @@ Use both `\` and `;` as leader key:
|
|||
```lua
|
||||
vim.keymap.set("n", ";", "<Leader>", { remap = true })
|
||||
vim.keymap.set("n", "'", "<Leader>", { remap = true })
|
||||
```
|
||||
|
||||
Misc keymap:
|
||||
|
||||
```lua
|
||||
vim.keymap.set("n", "n", "nzz")
|
||||
vim.keymap.set("n", "N", "Nzz")
|
||||
vim.keymap.set("n", "q", ":q<CR>")
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue