vim: Add support for temporary normal mode (ctrl-o) within insert mode (#19454)
Support has been added for the ctrl-o command within insert mode. Ctrl-o is used to partially enter normal mode for 1 motion to then return back into insert mode. Release Notes: - vim: Added support for `ctrl-o` in insert mode to enter temporary normal mode --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
254ce74036
commit
b1cd9e4d24
14 changed files with 145 additions and 11 deletions
|
@ -88,12 +88,19 @@ impl Render for ModeIndicator {
|
|||
return div().into_any();
|
||||
};
|
||||
|
||||
let vim_readable = vim.read(cx);
|
||||
let mode = if vim_readable.temp_mode {
|
||||
format!("(insert) {}", vim_readable.mode)
|
||||
} else {
|
||||
vim_readable.mode.to_string()
|
||||
};
|
||||
|
||||
let current_operators_description = self.current_operators_description(vim.clone(), cx);
|
||||
let pending = self
|
||||
.pending_keys
|
||||
.as_ref()
|
||||
.unwrap_or(¤t_operators_description);
|
||||
Label::new(format!("{} -- {} --", pending, vim.read(cx).mode))
|
||||
Label::new(format!("{} -- {} --", pending, mode))
|
||||
.size(LabelSize::Small)
|
||||
.line_height_style(LineHeightStyle::UiLabel)
|
||||
.into_any_element()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue