ViEditor: implement I and ^ using SoftHome
This commit is contained in:
parent
4adcbf6784
commit
a29eefca5a
1 changed files with 2 additions and 4 deletions
|
|
@ -143,8 +143,7 @@ impl<'a> Edit for ViEditor<'a> {
|
||||||
}
|
}
|
||||||
// Enter insert mode at start of line
|
// Enter insert mode at start of line
|
||||||
'I' => {
|
'I' => {
|
||||||
//TODO: soft home, skip whitespace
|
self.editor.action(font_system, Action::SoftHome);
|
||||||
self.editor.action(font_system, Action::Home);
|
|
||||||
self.mode = Mode::Insert;
|
self.mode = Mode::Insert;
|
||||||
}
|
}
|
||||||
// Create line after and enter insert mode
|
// Create line after and enter insert mode
|
||||||
|
|
@ -203,8 +202,7 @@ impl<'a> Edit for ViEditor<'a> {
|
||||||
// Go to end of line
|
// Go to end of line
|
||||||
'$' => self.editor.action(font_system, Action::End),
|
'$' => self.editor.action(font_system, Action::End),
|
||||||
// Go to start of line after whitespace
|
// Go to start of line after whitespace
|
||||||
//TODO: implement this
|
'^' => self.editor.action(font_system, Action::SoftHome),
|
||||||
'^' => self.editor.action(font_system, Action::Home),
|
|
||||||
// Enter command mode
|
// Enter command mode
|
||||||
':' => {
|
':' => {
|
||||||
self.mode = Mode::Command;
|
self.mode = Mode::Command;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue