-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
More vim movements for filebrowser #195
Conversation
* 'gg' goes to top * 'G' goes to bottom
* '^e' moves up one line * '^e' moves down one line
* '^f' scrolls down one screen * '^f' scrolls up one screen
if (modifierFlags & NSControlKeyMask) { | ||
[self.actionDelegate actionScrollUpOneScreen]; | ||
} | ||
return YES; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For 'e'
, 'y'
, 'f'
, and 'b'
YES
is returned even if the control key isn't pressed. I think return YES
should be moved into the if
statements and NO
should be returned otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The meaning of the return value of processKeyModeNormal
was not entirely clear to me. It returns YES
when the key command is known, NO
otherwise, right?
If that's the case then I absolutely agree with you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, fixed it in commit 4f65da6
You are very welcome. I'll add the tests when I've time for it, probably later today or tomorrow. |
I added unit tests for the new vim key movements. Okay like that? |
More vim movements for filebrowser
Thanks! |
This pull request enables new vim-like movements to the file browser:
gg
andG
that jump to the top and the bottom of the file browser