Add vim bindings and directory expand/collapse

- Replace arrow keys with j/k for navigation
- Add h/l for collapse/expand directories
- Remove emoji icons, use clean text markers
- Show directories with [-]/[+] expand markers
- Track expanded state per directory path
- Add directory suffix (/) for clarity
- Update help text with vim bindings
This commit is contained in:
2025-12-06 12:39:11 +01:00
parent 7ce264fd96
commit 8104f54887
3 changed files with 86 additions and 13 deletions

View File

@@ -101,12 +101,18 @@ async fn handle_key_event(state: &mut AppState, key_code: KeyCode) -> Result<()>
KeyCode::Char('q') => {
state.should_quit = true;
}
KeyCode::Up => {
KeyCode::Char('k') => {
state.move_selection_up();
}
KeyCode::Down => {
KeyCode::Char('j') => {
state.move_selection_down();
}
KeyCode::Char('h') => {
state.collapse_selected();
}
KeyCode::Char('l') => {
state.expand_selected();
}
KeyCode::Enter => {
if let Some(item) = state.get_selected_item() {
if !item.node.is_dir {