Skip to content

Add default values to end of line and beginning of life key bindings#301

Merged
danvergara merged 1 commit into
mainfrom
fix-vim-inspired-keybindings
Apr 7, 2026
Merged

Add default values to end of line and beginning of life key bindings#301
danvergara merged 1 commit into
mainfrom
fix-vim-inspired-keybindings

Conversation

@danvergara

Copy link
Copy Markdown
Owner

Add default values to new keybindings

@danvergara danvergara merged commit f9e9957 into main Apr 7, 2026
4 checks passed
@danvergara danvergara deleted the fix-vim-inspired-keybindings branch April 7, 2026 19:02

@utafrali utafrali left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is correct and fills the gap that left BeginningOfLine and EndOfLine with zero-value bindings when no config file is present. Two minor consistency issues: field initialization order differs from the struct declaration, and the help text strings diverge from the equivalent strings in SetupKeybindings.

Comment thread pkg/command/command.go
key.WithKeys("G"), // Capital 'G' for shift+g
key.WithHelp("G", "go to bottom"),
),
BeginningOfLine: key.NewBinding(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initialization order here (BeginningOfLine before EndOfLine) is the reverse of the struct field declaration order in TUIKeyBindings (lines 58-59), where EndOfLine comes first. Keeping the same order in both places makes it easier to scan and compare the two.

Comment thread pkg/command/command.go
),
BeginningOfLine: key.NewBinding(
key.WithKeys("0"),
key.WithHelp("0", "navigate all the way to the left of the table"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help text here ("navigate all the way to the left of the table") differs from the text used in pkg/config/config.go line 198 ("beginning of current line"). Same mismatch for EndOfLine: "navigate all the way to the right of the table" vs "end of current line". Since both paths produce a TUIKeyBindings that drives the same help display, the strings should match. Consider picking one phrasing and using it in both places.

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