diff --git a/help.md b/help.md index 676b5b3..922c4c8 100644 --- a/help.md +++ b/help.md @@ -69,24 +69,6 @@ like this: This allows you to make only minor additions/changes to an existing builtin mode without copying the whole mode and is easier to keep up-to-date. -Additionally, individual sub-modes may inherit all non-conflicting keybindings -from another sub-mode of the same mode by adding an `inherit` option to the -sub-mode section like this: - -``` - "normal": { - "inherit": "project", - ... -``` - -Multiple inheritance is supported with the `inherits` options like this: - -``` - "normal": { - "inherits": ["project", "tasks"], - ... -``` - ## Flow mode The default input mode, called just flow, is based on common GUI diff --git a/src/keybind/keybind.zig b/src/keybind/keybind.zig index 54ed92e..236a53f 100644 --- a/src/keybind/keybind.zig +++ b/src/keybind/keybind.zig @@ -386,7 +386,6 @@ const BindingSet = struct { line_numbers: LineNumbers = .inherit, cursor: ?CursorShape = null, inherit: ?[]const u8 = null, - inherits: ?[][]const u8 = null, selection: ?SelectionStyle = null, }; const parsed = try std.json.parseFromValue(JsonConfig, allocator, mode_bindings, .{ @@ -401,12 +400,7 @@ const BindingSet = struct { self.selection_style = parsed.value.selection orelse .normal; try self.load_event(allocator, &self.press, input.event.press, parsed.value.press); try self.load_event(allocator, &self.release, input.event.release, parsed.value.release); - if (parsed.value.inherits) |sibling_fallbacks| { - for (sibling_fallbacks) |sibling_fallback| if (namespace.get_mode(sibling_fallback)) |sib| { - for (sib.press.items) |binding| try append_if_not_match(allocator, &self.press, binding); - for (sib.release.items) |binding| try append_if_not_match(allocator, &self.release, binding); - }; - } else if (parsed.value.inherit) |sibling_fallback| { + if (parsed.value.inherit) |sibling_fallback| { if (namespace.get_mode(sibling_fallback)) |sib| { for (sib.press.items) |binding| try append_if_not_match(allocator, &self.press, binding); for (sib.release.items) |binding| try append_if_not_match(allocator, &self.release, binding);