Skip to content

Commit 24d6bfc

Browse files
partially emulate vim d-a-w
1 parent 95f4635 commit 24d6bfc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/vim.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,13 @@ impl Vim {
134134
textarea.cancel_selection();
135135
return Transition::Mode(Mode::Insert);
136136
},
137+
Input { key: Key::Char('a'), ctrl: false, .. } if matches!(self.mode, Mode::Operator('d')) => {
138+
textarea.cancel_selection();
139+
textarea.move_cursor(CursorMove::Forward);
140+
textarea.move_cursor(CursorMove::WordBack);
141+
textarea.start_selection();
142+
return Transition::Nop;
143+
},
137144
Input { key: Key::Char('a'), .. } => {
138145
textarea.cancel_selection();
139146
textarea.move_cursor(CursorMove::Forward);

0 commit comments

Comments
 (0)