Skip to content

Commit 5a1838f

Browse files
committed
docs!: repeat_motions can be stateless or stateful
1 parent a2d974b commit 5a1838f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,11 @@ opts = {
157157
keymaps = {
158158
-- Create t/T/f/F key mappings
159159
horizontal_motions = true,
160-
-- Create ; and , key mappings
161-
repeat_motions = true,
160+
-- Create ; and , key mappings. Set it to 'stateless', 'stateful', or false to
161+
-- not create any mappings. 'stateless' means that ;/, move right/left.
162+
-- 'stateful' means that ;/, will remember the direction of the original
163+
-- jump, and `,` inverts that direction (Neovim's default behaviour).
164+
repeat_motions = 'stateless',
162165
-- Keys that shouldn't be repeatable (because aren't motions), excluding the prefix `]`/`[`
163166
-- If you have custom motions that use one of these, make sure to remove that key from here
164167
disabled_keys = { 'p', 'I', 'A', 'f', 'i' },

lua/demicolon/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ local M = {}
77

88
---@class demicolon.keymaps.options
99
---@field horizontal_motions? boolean Create `t`/`T`/`f`/`F` key mappings
10-
---@field repeat_motions? false|'stateless'|'stateful' Create `;` and `,` key mappings
10+
---@field repeat_motions? 'stateless' | 'stateful' | false Create `;` and `,` key mappings. `'stateless'` means that `;`/`,` move right/left. `'stateful'` means that `;`/`,` will remember the direction of the original jump, and `,` inverts that direction (Neovim's default behaviour).
1111
---@field disabled_keys? table<string> Keys that shouldn't be repeatable (because aren't motions), excluding the prefix `]`/`[`
1212

1313
---@class demicolon.options

0 commit comments

Comments
 (0)