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

minor vim bind improvements #106

Closed
wants to merge 2 commits into from
Closed

Conversation

Ckath
Copy link
Contributor

@Ckath Ckath commented Sep 8, 2020

this addresses two things mainly:

  1. keep arrow keys working in vim mode
  2. allow hjkl movement in panels (open files, environment vars, etc)

the arrow keys are restored in vimmode by dropping H and K keys when vimmode is on and simply remapping HJKL to hjkl directly without the need to ruin arrow keys. hjkl movement in panels is simply added regardless of vimmode, as this doesnt collide with anything here and in the existing codebase it isnt trivial to access the settings from within panel.c

this would fix #69

- keep arrow keys working inside vimmode
- drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
natoscott added a commit that referenced this pull request Sep 14, 2020
There have been too many bugs reported in vim_mode, and
the proposed fixes are increasingly fragile - hence we
have decided to back it out for now.  For reference:

   #69
   #37
   #106

The whitespace changes also arrived in commit 12805f6
not sure what that was about, but backed out as well.
@cgzones cgzones added needs-discussion 🤔 Changes need to be discussed and require consent needs-rebase Pull request needs to be rebased and conflicts to be resolved labels Sep 15, 2020
@natoscott
Copy link
Member

See also: #37

@natoscott natoscott closed this Sep 15, 2020
ryenus pushed a commit to ryenus/htop that referenced this pull request Sep 25, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus added a commit to ryenus/htop that referenced this pull request Sep 25, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* using there being 3 keys in the function bar as detection for 'prompt'
* add comment to clarify prompt detection
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus pushed a commit to ryenus/htop that referenced this pull request Sep 29, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus added a commit to ryenus/htop that referenced this pull request Sep 29, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* using there being 3 keys in the function bar as detection for 'prompt'
* add comment to clarify prompt detection
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus pushed a commit to ryenus/htop that referenced this pull request Oct 3, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus added a commit to ryenus/htop that referenced this pull request Oct 3, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* using there being 3 keys in the function bar as detection for 'prompt'
* add comment to clarify prompt detection
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus pushed a commit to ryenus/htop that referenced this pull request Oct 7, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus added a commit to ryenus/htop that referenced this pull request Oct 7, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* using there being 3 keys in the function bar as detection for 'prompt'
* add comment to clarify prompt detection
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus pushed a commit to ryenus/htop that referenced this pull request Oct 30, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus added a commit to ryenus/htop that referenced this pull request Oct 30, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* using there being 3 keys in the function bar as detection for 'prompt'
* add comment to clarify prompt detection
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus pushed a commit to ryenus/htop that referenced this pull request Nov 22, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus added a commit to ryenus/htop that referenced this pull request Nov 22, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* using there being 3 keys in the function bar as detection for 'prompt'
* add comment to clarify prompt detection
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus pushed a commit to ryenus/htop that referenced this pull request Nov 23, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus added a commit to ryenus/htop that referenced this pull request Nov 23, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* using there being 3 keys in the function bar as detection for 'prompt'
* add comment to clarify prompt detection
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus pushed a commit to ryenus/htop that referenced this pull request Nov 24, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
ryenus added a commit to ryenus/htop that referenced this pull request Nov 24, 2020
This is the work done by ckath <ckat@teknik.io>, from the unmerged
pull request htop-dev#106

* Revert "Revert the vim_mode setting for now, needs a rethink"
*  - This reverts commit c9ecd0f.
*
* ignore vimmode in prompts
* using there being 3 keys in the function bar as detection for 'prompt'
* add comment to clarify prompt detection
* redo vimmode keybind mapping
* - keep arrow keys working inside vimmode
* - drop 'H' and 'K' binds in favor of logical 'hjkl' remaps
* allow hjkl for movement in panels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-discussion 🤔 Changes need to be discussed and require consent needs-rebase Pull request needs to be rebased and conflicts to be resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

arrow keys broken in vim mode
3 participants