This commit is contained in:
NotAShelf 2025-01-10 08:00:34 +00:00
commit b7a8690a73
2 changed files with 66 additions and 58 deletions

View file

@ -236,11 +236,11 @@ slightly changed. See the new <a class="link" href="/index.xhtml#ch-dag-entries"
making good use of its extensive Lua API. Additionally, Vimscript is slow and
brings unnecessary performance overhead while working with different
configuration formats.</p>
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 id="sec-vim-maps-rewrite" class="title" ><code class="literal">vim.maps</code> rewrite </h3> </div> </div></div><p>Instead of specifying map modes using submodules (eg.: <code class="literal">vim.maps.normal</code>), a new
<code class="literal">vim.keymaps</code> submodule with support for a <code class="literal">mode</code> option has been introduced. It
can be either a string, or a list of strings, where a string represents the
short-name of the map mode(s), that the mapping should be set for. See
<code class="literal">:help map-modes</code> for more information.</p><p>For example:</p><pre><code class="programlisting nix">vim.maps.normal.&quot;&lt;leader&gt;m&quot; = { ... };
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 id="sec-vim-maps-rewrite" class="title" ><code class="literal">vim.maps</code> rewrite </h3> </div> </div></div><p>Instead of specifying map modes using submodules (e.g.: <code class="literal">vim.maps.normal</code>), a
new <code class="literal">vim.keymaps</code> submodule with support for a <code class="literal">mode</code> option has been
introduced. It can be either a string, or a list of strings, where a string
represents the short-name of the map mode(s), that the mapping should be set
for. See <code class="literal">:help map-modes</code> for more information.</p><p>For example:</p><pre><code class="programlisting nix">vim.maps.normal.&quot;&lt;leader&gt;m&quot; = { ... };
</code></pre><p>has to be replaced by</p><pre><code class="programlisting nix">vim.keymaps = [
{
key = &quot;&lt;leader&gt;m&quot;;