Skip to content

Commit

Permalink
neomutt: allow binds to override vimKeys
Browse files Browse the repository at this point in the history
In the generated neomutt configuration, source the optional
`vim-keys.rc` before applying the `binds` configuration, to allow the
user to override keybindings from `vim-keys.rc`.

Adapt the test files to account for the empty space left by the unset
`vimKeys` option.
  • Loading branch information
gbirke authored Apr 29, 2024
1 parent 7ec0ae1 commit 1a91cb7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions modules/programs/neomutt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -457,15 +457,15 @@ in {
set delete = yes
${optionalString cfg.vimKeys
"source ${pkgs.neomutt}/share/doc/neomutt/vim-keys/vim-keys.rc"}
# Binds
${bindSection}
# Macros
${macroSection}
${optionalString cfg.vimKeys
"source ${pkgs.neomutt}/share/doc/neomutt/vim-keys/vim-keys.rc"}
# Register accounts
${
optionalString (accountCommandNeeded) ''
Expand Down
4 changes: 2 additions & 2 deletions tests/modules/programs/neomutt/neomutt-expected.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ alternative_order text/enriched text/plain text

set delete = yes

# Binds


# Macros
# Binds


# Macros


# Register accounts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ alternative_order text/enriched text/plain text

set delete = yes

# Binds


# Macros
# Binds


# Macros


# Register accounts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ alternative_order text/enriched text/plain text

set delete = yes



# Binds
bind editor <Tab> "complete-query"
bind index,pager \Cp "sidebar-prev"
Expand All @@ -17,8 +19,6 @@ bind index,pager \Cp "sidebar-prev"
macro index s "<save-message>?<tab>"
macro index,pager c "<change-folder>?<change-dir><home>^K=<enter><tab>"



# Register accounts
# register account [email protected]
mailboxes "/home/hm-user/Mail/[email protected]/Inbox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ alternative_order text/enriched text/plain text

set delete = yes

# Binds


# Macros
# Binds


# Macros


# Register accounts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ alternative_order text/enriched text/plain text

set delete = yes

# Binds


# Macros
# Binds


# Macros


# Register accounts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ alternative_order text/enriched text/plain text

set delete = yes

# Binds


# Macros
# Binds


# Macros


# Register accounts
Expand Down

0 comments on commit 1a91cb7

Please sign in to comment.