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

feat(keymap): move windows without <C-w> #1368

Merged
merged 1 commit into from
Mar 24, 2025
Merged

Conversation

sand4rt
Copy link
Contributor

@sand4rt sand4rt commented Feb 18, 2025


NOTE
Please verify that the base repository above has the intended destination!
Github by default opens Pull Requests against the parent of a forked repository.
If this is your personal fork and you didn't intend to open a PR for contribution
to the original project then adjust the base repository accordingly.


@feoh
Copy link
Collaborator

feoh commented Feb 19, 2025

This feels like a highly personalized customization to me. But if we get a ton of "HECK YES WE WANT THIS MERGE IT PLEASE!" I'll be delighted to do so.

@sand4rt
Copy link
Contributor Author

sand4rt commented Feb 19, 2025

@feoh I added those keymaps because similar ones that allow changing window focus without using <C-w> are included in kickstart.nvim. It seems odd to me that window movement still requires <C-w> but window focus doesn't:

kickstart.nvim/init.lua

Lines 186 to 190 in 34e7d29

-- See `:help wincmd` for a list of all window commands
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })

Feel free to close the PR if it's not desired of course.

@feoh
Copy link
Collaborator

feoh commented Feb 19, 2025

Hey thanks for the explanation. I like the idea!

Anyone have any feelings about this? I'd just love a second "I want this" before I merge.

@glaulher
Copy link

I liked it, it was more simplified.

@VlaDexa
Copy link
Contributor

VlaDexa commented Mar 20, 2025

I won't use these, but I like the idea of including these as a helping aid guiding people to learn about windows and tabs and stuff

@feoh
Copy link
Collaborator

feoh commented Mar 24, 2025

Thanks everyone for chiming in! Merging!

@feoh feoh merged commit e947649 into nvim-lua:master Mar 24, 2025
1 check passed
jacklsw pushed a commit to jacklsw/kickstart.nvim that referenced this pull request Mar 25, 2025
glaulher added a commit to glaulher/kickstart.nvim that referenced this pull request Mar 25, 2025
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.

4 participants