Comments (12)
I added functionality for overriding mappings. Please look at the README for further information.
I will not close this issue until all popups support this.
Missing popups:
- Help (Should be generated from status mappings I guess?)
- Push
- Pull
- Branch
- Commit
- Log
- Stash
from neogit.
This is not possible yet, but I will add this later today.
from neogit.
Thanks a lot for the rapid feedback! 🙇
from neogit.
After thinking about it some more, I'm not too sure whether supporting remappings of popup windows is really needed.
@RianFuro any thoughts?
from neogit.
@TimUntersberger It's tricky, right? Magit has this "convention over configuration" mentality, which kind of clashes how stuff is usually done in vim-space.
I think you're right; we don't actually need remappable controls in popups as far as keyboard layouts are concerned, since all that's allowed in there is pressing the described shortcuts.
Beyond needing though, this becomes a discussion of how much we want to move away from that convention over configuration mindset. I don't think there's a clear answer to that; I'd likely not implement this myself since I see no need, but if somebody would feel strong enough about it to contribute the functionality, I wouldn't be entirely against merging it.
from neogit.
The idea is that I’m not using a qwerty keyboard, I’m using a bépo layout, and my j and k keys are t and s. So if I want to move the cursor up, I press s.
I would definitely like a way to override pop-ups keybindings as it will be a nightmare otherwise. The only other solution I have otherwise is to fork and modify the Lua code, which is clearly not ideal.
from neogit.
@phaazon you're not really moving the cursor (or doing anything but using the presented keybindings for that matter) in the popups.
Maybe we need a better naming scheme here 😅 when we say popup we mean the prompts that just show you the available options and keybindings, not the status or log buffer and such.
I'm just using a regular qwerty layout though, so maybe I'm overlooking something here. Can you elaborate what problems you would have in the prompt-style popups? I realize that cursor movement and other default bindings are different for you, but I don't think any of those apply in those buffers (or make no sense to use anyway)
from neogit.
@phaazon the way I think about the popups (or "transient commands" in magit) is a visual representation of key chords.
For example:
You could add a mapping for pushing to upstream like Pu
which does exactly the same (Actually in magit the popups only appear after some delay after pressing P
).
Now one advantage of popups is that you don't have to remember ANY keybindings except the popup keybindings, because you always have a list of available commands. Another one is that these make it possible to realize something like the options and switches you can see in some popups (like the log popup), which would be impossible to make usable with normal keybindings.
And don't get me wrong if there really is a need for being able to customize them, then we will implement it. Implementing this is really easy, because you just have to do the same thing I did for the status buffer except for the popups themselves (which is really tedious to maintain/create imo)
from neogit.
Navigating hunks / files does move the cursor, though.
from neogit.
@phaazon That's where the difference is. We're completely on board with allowing mapping customization for the status- and log-buffer (and every subsequent navigatable buffer). But as for the "shortcut" buffers (like when you press c
for the commit popup or Z
for the stash popup from the status buffer), there's really no need to customize anything, as they just offer you some mnemonic bindings and a way to set options and don't allow (or at least meaningfully react to) any other input.
from neogit.
Ah for the transient popups, I totally agree, it even makes more sense to keep semantic keybindings — i.e. ce
for commit extend, etc.
from neogit.
@phaazon is this fixed for you?
from neogit.
Related Issues (20)
- Allow `show_staged_diff` to open in a vertical split HOT 1
- un staged files showing folded without filename by default HOT 6
- Latest commit broke with `attempt to call field 'system' (a nil value)` HOT 4
- `ZZ`/`ZQ` shortcuts for rebase message editor HOT 1
- Neogit doesn't work anymore with latest commit and default config HOT 1
- [Bug] Issues with keymaps persist HOT 6
- No way to manually open console HOT 5
- Feature request: Set buffer options in gitcommit/NeogitCommitMessage filetype
- Attempt to index local 'diff' (a nil value) HOT 4
- Opening Neogit: bisect.lua:91: Attempt to index local 'oid' (a nil value) HOT 1
- Status not being automatically refreshed when staging / unstaging / commiting / pushing on Windows HOT 27
- Neogit misreads Nvim version HOT 1
- Support to custom keymap for navigation? (h,j,k,l)
- Can't unmap "u" key in status HOT 5
- Add Diff Arguments Support
- Push refspec support HOT 1
- issue with kind=replace HOT 5
- Using the default config from README.md does not work HOT 1
- vim.wait must not be called in a lua loop callback HOT 13
- Open Current Branch in Browser HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neogit.