doc: make section order actually stable

We were already trying to achieve that by sorting the table, but we were
actually sorting by values (i.e. documentation text of a particular
section). To fix this, we now extract the keys, sort them and get back
the items from the initial table, in alphabetical order now.
This commit is contained in:
Clément Joly 2022-11-13 17:26:15 +00:00 committed by Clément Joly
parent 5d68c5666b
commit 090b4fdb16
3 changed files with 45 additions and 43 deletions

View File

@ -44,34 +44,21 @@ The following subsections go into details of exactly what mappings are
in each group. “Modes” have the same meaning as in the |map-table|.
--------------------------------------------------------------------------------
require("bepo").tabs() *bepo.nvim-tabs*
le couple [gb]/[gé] agit sur les tabs
require("bepo").easy_access() *bepo.nvim-easy_access*
Modes Bepo Qwerty
n gb gT
n gé gt
n gB :execute "silent! tabfirst"<CR>
n gÉ :execute "silent! tablast"<CR>
n gT <C-]>
--------------------------------------------------------------------------------
require("bepo").window() *bepo.nvim-window*
[w] est libre pour faire <C-w>, grâce à easy_access
Modes Bepo Qwerty
n w <C-w>
n W <C-w><C-w>
n wc <C-w>h
n wt <C-w>j
n ws <C-w>k
n wr <C-w>l
n wC <C-w>H
n wT <C-w>J
n wS <C-w>K
n wR <C-w>L
n wh <C-w>s
n wé <C-w>t
n wÉ <C-w>T
n « <
x « <gv
n » >
x » >gv
nx g, g;
nx g; g,
nx é w
nx É W
ox aé aw
ox aÉ aW
ox ié iw
ox iÉ iW
--------------------------------------------------------------------------------
require("bepo").movement() *bepo.nvim-movement*
@ -102,21 +89,34 @@ on préserve {hjkl} pour les directions
nx K S
--------------------------------------------------------------------------------
require("bepo").easy_access() *bepo.nvim-easy_access*
require("bepo").tabs() *bepo.nvim-tabs*
le couple [gb]/[gé] agit sur les tabs
Modes Bepo Qwerty
n « <
x « <gv
n » >
x » >gv
nx g, g;
nx g; g,
nx é w
nx É W
ox aé aw
ox aÉ aW
ox ié iw
ox iÉ iW
n gb gT
n gé gt
n gB :execute "silent! tabfirst"<CR>
n gÉ :execute "silent! tablast"<CR>
n gT <C-]>
--------------------------------------------------------------------------------
require("bepo").window() *bepo.nvim-window*
[w] est libre pour faire <C-w>, grâce à easy_access
Modes Bepo Qwerty
n w <C-w>
n W <C-w><C-w>
n wc <C-w>h
n wt <C-w>j
n ws <C-w>k
n wr <C-w>l
n wC <C-w>H
n wT <C-w>J
n wS <C-w>K
n wR <C-w>L
n wh <C-w>s
n wé <C-w>t
n wÉ <C-w>T
vim:tw=78:ts=8:ft=help:norl:

View File

@ -138,4 +138,3 @@
:tabs mapping-tabs
:easy_access mapping-easy-access
:window mapping-window}

View File

@ -102,11 +102,14 @@ in each group. “Modes” have the same meaning as in the |map-table|.
(let [tbl (collect [name docstruct (pairs bepo)]
(if (= name :setup) nil
(= (type docstruct) :table) (values name docstruct)
(error (.. "Invalid type for " name))))]
(error (.. "Invalid type for " name))))
tbl_keys (icollect [name docstructy (pairs tbl)]
name)]
(do
(table.sort tbl)
(each [name docstruct (pairs tbl)]
(table.sort tbl_keys)
(each [_ name (pairs tbl_keys)]
(do
(local docstruct (. tbl name))
(var need-header true)
(fn print-header []
(do