Skip to content

Commit d0f2c2f

Browse files
committed
Renamed config option to unbind-default-keys
1 parent ba18c72 commit d0f2c2f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

book/src/remapping.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Control, Shift and Alt modifiers are encoded respectively with the prefixes
5151

5252
Individual keys can be disabled by binding them to the `no_op` command.
5353

54-
To remove the default bindings for all modes defined by the user, `unbind_defaults = true` can be added to the top level configuration.
54+
To remove the default bindings for all modes defined by the user, `unbind-default-keys = true` can be added to the top level configuration.
5555

5656
Commands can be found at [Keymap](https://docs.helix-editor.com/keymap.html) Commands.
5757

helix-term/src/config.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use toml::de::Error as TomlError;
1212
pub struct Config {
1313
pub theme: Option<String>,
1414
#[serde(default)]
15-
pub unbind_defaults: bool,
15+
pub unbind_default_keys: bool,
1616
#[serde(default)]
1717
pub keys: HashMap<Mode, Keymap>,
1818
#[serde(default)]
@@ -40,15 +40,15 @@ impl Config {
4040
pub fn new() -> Self {
4141
Config {
4242
theme: None,
43-
unbind_defaults: false,
43+
unbind_default_keys: false,
4444
keys: Default::default(),
4545
editor: Default::default(),
4646
}
4747
}
4848
pub fn with_default_keys() -> Self {
4949
Config {
5050
theme: None,
51-
unbind_defaults: false,
51+
unbind_default_keys: false,
5252
keys: default_keys(),
5353
editor: helix_view::editor::Config::default(),
5454
}
@@ -90,7 +90,7 @@ impl Config {
9090
pub fn load(config_path: PathBuf) -> Result<Config, ConfigLoadError> {
9191
match std::fs::read_to_string(config_path) {
9292
Ok(config) => match toml::from_str::<Config>(&config) {
93-
Ok(config) if config.unbind_defaults => {
93+
Ok(config) if config.unbind_default_keys => {
9494
Ok(config.replace_into_keys(Config::with_default_keys()))
9595
}
9696
Ok(config) => Ok(config.merge_into_keys(Config::with_default_keys())),

0 commit comments

Comments
 (0)