Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add last modified file (gm) #1093

Merged
merged 1 commit into from
Dec 2, 2021

Conversation

pickfire
Copy link
Contributor

@pickfire pickfire commented Nov 13, 2021

cc @EpocSquadron

This will change gm (goto middle) to gc but now it matches kakoune behavior and our zc.

Based on mawww/kakoune#3814

book/src/keymap.md Outdated Show resolved Hide resolved
helix-view/src/view.rs Outdated Show resolved Hide resolved
@@ -520,9 +520,10 @@ impl Default for Keymaps {
"r" => goto_reference,
"i" => goto_implementation,
"t" => goto_window_top,
"m" => goto_window_middle,
"c" => goto_window_middle,
Copy link
Member

Choose a reason for hiding this comment

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

I rejected changing this keybind before :P why not find a different keymap for goto_last_modified_file?

Copy link
Contributor Author

@pickfire pickfire Nov 14, 2021

Choose a reason for hiding this comment

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

There are a couple of reasons

  • it is the same as kakoune now gc, and the name center works fine too
  • it is more aligned with view mode, zc have the same behavior and it is named "center" not "middle", zm named "middle" changes the cursor horizontally, not vertically like this one
  • at the same time gm fits nicely according to ga since it means last modified file and ga means last accessed file

Do you have any suggestions for this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we'd want to put this in the default keymap but I'd probably remap goto_last_modified_file to gM.

@archseer archseer merged commit e2b428c into helix-editor:master Dec 2, 2021
@pickfire pickfire deleted the last-modified-file branch December 4, 2021 13:50
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.

None yet

4 participants