-
Notifications
You must be signed in to change notification settings - Fork 282
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
Keybinding Suggestions and Contribution Opportunities #1423
Comments
Hello, would also be nice to alias j and k to down and up for non-input fields too. thanks for welcoming suggestions! |
@glennsl |
I would like to be able to "kind of import" my mappings from
|
@irevived1 Yeah, that's definitely planned, although probably using @fanantoxa Oh, lol, of course. I just use it all the time! Removed from the list. @escorponox There's already experimental support for VimL, including remapping. See https://onivim.github.io/docs/configuration/settings#experimental |
Thanks @jakeday. Noted. |
The VSCode actions for focusing tabs by number is I think I will look into adding this and the nextEditor/previousEditor commands. I will probably will make a loop for defining the commands and key bindings for the numbered ones, and then map those to |
Thanks @leavengood. I've updated the OP and assigned you to those.
I think they are, but they're pretty broken? No idea what the problem might be though. Maybe @bryphe has some ideas. |
This wraps around like VSCode. Fixes onivim#778 and part of onivim#1423.
This wraps around like VSCode. Fixes onivim#778 and part of onivim#1423.
I added #1450 for indenting and outdenting with tab and shift tab when in visual mode. Let me know if I need to change anything! |
* Implement the next/previous editor commands and keybindings This wraps around like VSCode. Fixes #778 and part of #1423. * Remove unneeded new actions * Adjust how the next/previous editor code works in EditorGroup Resolve the TODO for _getIndexOfElement by making it return option(int). List.find_opt is not actually the right choice to get an index. Also ran `esy format`.
It'd be nice for the keybinding docs to be updated as well (and then kept up to date with any changes from this issue). There is a complete list here https://github.com/onivim/oni2/blob/master/src/Store/KeyBindingsStoreConnector.re, which could be used to fill in any default bindings and missing conditions for the documentation. The website file lives here: https://github.com/onivim/oni2/blob/master/docs/docs/configuration/key-bindings.md |
It's been brought up before, but I can't find that there's any existing issues for it. You should create one for it. It's a cool feature. I can't see how it relates to keybindings though. |
Does the file explorer currently support keybindings? In vscode, i find it natural to map Edit: Should've searched issues more before commenting 🤦 #528 |
It would be nice when you are in Search to be able to select all the text. Perhaps Cmd + a? Happy to take a stab at this, if there isn't someone assigned to this already. |
@benschinn There already a implemented. |
…2397) A simple change that allows keybindings to invoke ex commands directly, and could address quite a few of the requests in #1423. The downside of doing this instead of implementing proper commands is of course that they won't be discoverable through the command palette, but this doesn't prevent proper commands to be added either, so I think it might be a nice convenient stop-gap solution to unblock people at least. Example: ``` {key: "kk", command: ":split", when: "editorTextFocus"} ``` Let me know if you think this is a viable approach @bryphe, then I'll add a few integration tests before it's merged. Fixes #807
I'm a big fan of using enter for completion and / to move through suggestion. This actually easier to set in vim than in vim with some autocompletion plugins. {
"key":"<S-Tab>",
"command":"selectPrevSuggestion",
"when":"editorTextFocus && suggestWidgetVisible"
},
{
"key":"<Tab>",
"command":"selectNextSuggestion",
"when":"editorTextFocus && suggestWidgetVisible"
},
{
"key":"<CR>",
"command":"acceptSelectedSuggestion",
"when":"suggestWidgetVisible && editorTextFocus"
} |
I think it would be cool if there was a list of all possible values for command so that someone could make a |
I wish :enew or "workbench.action.files.newUntitledFile" is implemented in keybindings |
@spar7453: You can bind to |
@glennsl I think that we cannot bind every vim commands in this way (I had to put empty space in front of "s" because the editor removes "< space>") |
How about Is there a way we could bind the command |
The issue should be updated to link to |
Is #1349 "Go to next error" done? Otherwise I might take a look at it this weekend, would be fun to get into the codebase and start contributing. |
Hi @Szune , Go to next error is not implemented yet - it would be awesome to have though! I find myself wanting it all the time 😄 Let me know if you need help getting started |
Cool @bryphe , I'll try to get started on it when I wake up later today 😃 Is there anything I should look at other than https://onivim.github.io/docs/for-developers/contributing before beginning? |
I would like to have this working, to be able to use // Quick Open
{ "key": "ctrl+k", "command": "workbench.action.quickOpenSelectPrevious", "when": "inQuickOpen" },
{ "key": "ctrl+j", "command": "workbench.action.quickOpenSelectNext", "when": "inQuickOpen" }, |
@goetzc How about: {"key": "ctrl+k", "command": "list.focusUp", "when": "inQuickOpen"},
{"key": "ctrl+j", "command": "list.focusDown", "when": "inQuickOpen"}, or, to use the same in any list view: {"key": "ctrl+k", "command": "list.focusUp", "when": "listFocus"},
{"key": "ctrl+j", "command": "list.focusDown", "when": "listFocus"}, |
@lettertwo that works perfect, thank you! |
Seems like the "Open settings" keybinding is not being worked on yet, so I'll gladly get started on that. 😄 |
I think the brackets/surroundings of the plugin surround.vim are so great they should be on by default: the nice thing is that they don't conflict with vim keys ! |
@rambip is it possible to use surround.vim with Oni2 at the moment? I didn't see that yet...? |
Just found this issue and want to move by open issue to this comment and close it, also going to review info provided to see how this might be resolved. Leaving my comments below to see if anyone has already resolved or dealt with this. Two items strike me as usability issues for myself and I wanted to welcome any comments on resolving or agreeing with their existence. EDIT: I've just noticed that the use of Item 1
Item 2
Thank you. |
I'd like to add a couple of suggestions:
|
I wish Ctrl + / as toggle comments(single & multi line) |
This is the place to be if you want to suggest a keybinding, or find a nice and (usually) easy task to start contributing.
Suggestions
Default
PR/Issue
SaveMod+S
#1426
Mod+1 - Mod+9
Previous TabMod+PgUp / Cmd+Shift+[
#778/#1447
Next TabMod+PgDn / Cmd+Shift+]
#778/#1447
Mod+C
#1233
Mod+X
#1233
Mod+V
#1233
F8
Shift + F8
F4
Shift + F4
Cmd+,
Zoom InCtrl++
#1556/#1629
Zoom OutCtrl+-
#1556/#1629
Zoom ResetCtrl+0
#1556/#1629
Do you have other suggestions? Post a comment below! If the keybinding exists in vscode as well, it would be nice if you could post the name, command and default keybinding used there.
How to contribute
Keybindings are defined in
KeyBindingsStoreConnector
. Here's the keybinding forunfo
, for example:oni2/src/Store/KeyBindingsStoreConnector.re
Lines 162 to 166 in bb2df4c
When invoked this will generate a
Command("undo")
action, which needs to be handled in a Store somewhere. Theundo
comamnd is handled inVimStoreConnector
here:oni2/src/Store/VimStoreConnector.re
Line 855 in bb2df4c
Which invokes the effect defined a bit further up, here:
oni2/src/Store/VimStoreConnector.re
Lines 827 to 834 in bb2df4c
A lot of keybindings will be like this, just delegating to libvim to handle it. Some might require a bit more though, but a good place to start is to look into how this is done and vim, and whether it can be delegated in the same manner as this.
If you feel ready to tackle one of the suggestions above, post a comment below to lets us know, then dive in! If you have questions, the best place to ask is in the #dev channel on our Discord server.
The text was updated successfully, but these errors were encountered: