feat: Add line manipulation shortcuts (Delete Line, Move Line Up/Down) by abcd-ca · Pull Request #29 · OlaProeis/Ferrite · GitHub
Skip to content

feat: Add line manipulation shortcuts (Delete Line, Move Line Up/Down)#29

Merged
OlaProeis merged 2 commits into
OlaProeis:masterfrom
abcd-ca:feature/keyboard-line-manipulation
Jan 19, 2026
Merged

feat: Add line manipulation shortcuts (Delete Line, Move Line Up/Down)#29
OlaProeis merged 2 commits into
OlaProeis:masterfrom
abcd-ca:feature/keyboard-line-manipulation

Conversation

@abcd-ca

@abcd-ca abcd-ca commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Cmd/Ctrl+D to delete current line (configurable in settings)
  • Add Alt+Up/Down to move current line up/down (configurable in settings)
  • Fix line operations not working in Split mode (cursor position was being overwritten by rendered pane)
  • Fix tooltips showing "Ctrl+E" instead of "Cmd+E" on macOS
  • Add keyboard shortcut documentation
  • Add i18n translations for new shortcut settings (en, de, ja, zh_Hans)

Details

Line Manipulation

New keyboard shortcuts for common editing operations:

  • Delete Line: Removes the current line entirely, placing cursor at the same column on the next line
  • Move Line Up/Down: Swaps the current line with the line above/below

Split Mode Fix

In Split mode, the rendered pane was overwriting tab.cursor_position after the raw editor set it. This caused line operations (delete line, move line) to operate on the wrong line when editing in the raw pane. Fixed by not updating cursor_position from the rendered pane in Split mode.

macOS Tooltip Fix

View mode tooltips were hardcoded to show "Ctrl+E" on all platforms. Now uses modifier_symbol() helper to show "Cmd+E" on macOS.

Test plan

  • cargo build compiles successfully
  • Test Delete Line (Cmd+D) in Raw mode
  • Test Delete Line (Cmd+D) in Split mode - should delete line in left pane
  • Test Move Line Up/Down (Alt+Arrow) in Raw mode
  • Test Move Line Up/Down (Alt+Arrow) in Split mode
  • Hover over view mode indicator - should show "Cmd+E" on macOS, "Ctrl+E" on other platforms

- Add Cmd/Ctrl+D to delete current line
- Add Alt+Up/Down to move current line up/down
- Fix line operations not working in Split mode (cursor position was being
  overwritten by rendered pane)
- Fix tooltips showing "Ctrl+E" instead of "Cmd+E" on macOS
- Add keyboard shortcut documentation
- Add i18n translations for new shortcut settings
@abcd-ca

abcd-ca commented Jan 19, 2026

Copy link
Copy Markdown
Contributor Author

@OlaProeis

Copy link
Copy Markdown
Owner

@OlaProeis OlaProeis merged commit cf664dd into OlaProeis:master Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants