summaryrefslogtreecommitdiff
path: root/src/modal.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/modal.zig')
-rw-r--r--src/modal.zig15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/modal.zig b/src/modal.zig
index 0e6aba61..6bf7918f 100644
--- a/src/modal.zig
+++ b/src/modal.zig
@@ -109,6 +109,8 @@ pub const Normal = struct {
to_uppercase,
join_lines,
join_select_space,
+ rotate_contents_fwd,
+ rotate_contents_back,
indent,
unindent,
format,
@@ -262,6 +264,8 @@ pub const Normal = struct {
uppercase,
join_lines,
join_select_space,
+ rotate_contents_forward,
+ rotate_contents_backward,
indent,
unindent,
comment_toggle,
@@ -319,7 +323,14 @@ pub const Normal = struct {
.search_step,
=> .once,
.edit => |edit| switch (edit.kind) {
- .join_lines, .join_select_space, .comment_toggle, .undo, .redo => .once,
+ .join_lines,
+ .join_select_space,
+ .rotate_contents_forward,
+ .rotate_contents_backward,
+ .comment_toggle,
+ .undo,
+ .redo,
+ => .once,
else => .per_selection,
},
else => .per_selection,
@@ -552,6 +563,8 @@ pub const Normal = struct {
if (key.has(.to_uppercase)) return resultAction(.{ .edit = .{ .kind = .uppercase, .count = count } });
if (key.has(.join_lines)) return resultAction(.{ .edit = .{ .kind = .join_lines, .count = count } });
if (key.has(.join_select_space)) return resultAction(.{ .edit = .{ .kind = .join_select_space, .count = count } });
+ if (key.has(.rotate_contents_fwd)) return resultAction(.{ .edit = .{ .kind = .rotate_contents_forward, .count = count } });
+ if (key.has(.rotate_contents_back)) return resultAction(.{ .edit = .{ .kind = .rotate_contents_backward, .count = count } });
if (key.has(.indent)) return resultAction(.{ .edit = .{ .kind = .indent, .count = count } });
if (key.has(.unindent)) return resultAction(.{ .edit = .{ .kind = .unindent, .count = count } });
if (key.has(.format)) return resultAction(.{ .lsp = .format });