Skip to content

Commit

Permalink
Add d$ (delete to line end) support (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
panarch authored Nov 7, 2024
1 parent ab89d3d commit 08a3b8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/src/state/notebook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ impl NotebookState {
format!("[i] Inside mode"),
format!("[d] Delete {n} lines"),
"[0] Delete to line start".to_owned(),
"[$] Delete to line end".to_owned(),
"[1-9] Append steps".to_owned(),
"[Esc] Cancel".to_owned(),
]
Expand Down
5 changes: 5 additions & 0 deletions core/src/state/notebook/inner_state/editing_normal_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,11 @@ async fn consume_delete(

DeleteLines(n).into()
}
Key(KeyEvent::DollarSign) => {
state.inner_state = InnerState::EditingNormalMode(VimNormalState::Idle);

DeleteLineEnd(n).into()
}
Key(KeyEvent::I) => {
state.inner_state = InnerState::EditingNormalMode(VimNormalState::DeleteInside(n));

Expand Down

0 comments on commit 08a3b8e

Please sign in to comment.