-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[vim] I usually use ctrl-y when I do autocomplete on Neovim, but I don't think it's possible to do it on zed. #8707
Comments
Really would love to have the ability to remap the copilot accept key, as I also have it remapped to , as I sometimes accepted suggestions I didn't mean to. Hopefully this could be added soon 🙏 |
Does this work for you? {
"context": "Editor && showing_completions",
"bindings": {
"ctrl-y": "editor::ConfirmCompletion"
}
} |
For me it didn't on the latest Preview version. Also I would need the option to unbind tab, as this is just as important for my usecase |
thank you. [
{
"context": "Editor && VimControl && !VimWaiting && !menu",
"bindings": {
// put key-bindings here if you want them to work in normal & visual mode
}
},
{
"context": "Editor && vim_mode == normal && !VimWaiting && !menu",
"bindings": {
// put key-bindings here if you want them to work only in normal mode
// ~~~~~~~ Normal Mode
// Doc hover
"K": "editor::Hover",
// buffer :bn :bp
"L": "pane::ActivateNextItem",
"H": "pane::ActivatePrevItem",
// quick fix
"space g a": "editor::ToggleCodeActions",
"] d": "editor::GoToDiagnostic",
"[ d": "editor::GoToPrevDiagnostic",
"g m": "editor::ExpandMacroRecursively",
// LSP rename "ga" multi cursor
"space r": "editor::Rename",
// symbol search "gs"
"space o": "project_symbols::Toggle",
// NERDTree
"space e": "project_panel::ToggleFocus",
"space x": "workspace::CloseAllDocks",
// Terminal Pannel(shell)
"space s h": "terminal_panel::ToggleFocus",
// trouble toggle
"space t": "diagnostics::Deploy"
}
},
{
"context": "Editor && vim_mode == visual && !VimWaiting && !menu",
"bindings": {
// visual, visual line & visual block modes
// ~~~~~~ Visual Mode
"K": "editor::MoveLineUp",
"J": "editor::MoveLineDown",
"space g c": "editor::ToggleComments"
}
},
{
"context": "Editor && vim_mode == insert && !menu",
"bindings": {
// put key-bindings here if you want them to work in insert mode
// ~~~~~~ Insert Mode
"j k": ["vim::SwitchMode", "Normal"]
}
},
{
"context": "Editor && showing_completions",
"bindings": {
"ctrl-y": "editor::ConfirmCompletion"
}
},
{
"context": "Editor && vim_mode == insert && menu",
"bindings": {
// put key-bindings here if you want them to work in insert mode
// ~~~~~~ Insert Mode
"j k": ["vim::SwitchMode", "Normal"]
}
},
{
"context": "ProjectPanel",
"bindings": {
"h": "project_panel::CollapseSelectedEntry",
"l": "project_panel::ExpandSelectedEntry",
"j": "menu::SelectNext",
"k": "menu::SelectPrev",
"o": "menu::Confirm",
"r": "project_panel::Rename",
"z c": "project_panel::CollapseSelectedEntry",
"z o": "project_panel::ExpandSelectedEntry",
"shift-o": "project_panel::RevealInFinder",
"x": "project_panel::Cut",
"c": "project_panel::Copy",
"p": "project_panel::Paste",
"d": "project_panel::Delete",
"a": "project_panel::NewFile",
"shift-a": "project_panel::NewDirectory",
"shift-y": "project_panel::CopyRelativePath",
"g y": "project_panel::CopyPath"
}
}
]
|
@YoungHaKim7 did you manage to unbind tab from autocompleting? |
{
"context": "Editor && showing_completions",
"bindings": {
"ctrl-y": "editor::ConfirmCompletion"
}
}, It works very well when you apply json in the key map like this.
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
"theme": "Tokyo Night gy InlayHint red",
"ui_font_family": "Hack Nerd Font Mono",
"vim_mode": true,
"ui_font_size": 22,
"buffer_font_size": 22,
// Set the buffer's line height.
// May take 3 values:
// 1. Use a line height that's comfortable for reading (1.618)
//"line_height": "comfortable",
// 2. Use a standard line height, (1.3)
//"line_height": "standard",
// 3. Use a custom line height
"line_height": {
"custom": 1.0
},
"relative_line_numbers": true,
// disable cursor blink
// "cursor_blink": false,
"inlay_hints": {
// Global switch to toggle hints on and off, switched off by default.
"enabled": true,
// Toggle certain types of hints on and off, all switched on by default.
"show_type_hints": true,
"show_parameter_hints": true,
// Corresponds to null/None LSP hint type value.
"show_other_hints": true
},
"project_panel": {
// Default width of the project panel.
"default_width": 240,
// Where to dock project panel. Can be 'left' or 'right'.
"dock": "right",
// Whether to show file icons in the project panel.
"file_icons": true,
// Whether to show folder icons or chevrons for directories in the project panel.
"folder_icons": true,
// Whether to show the git status in the project panel.
"git_status": true,
// Amount of indentation for nested items.
"indent_size": 20,
// Whether to reveal it in the project panel automatically,
// when a corresponding project entry becomes active.
// Gitignored entries are never auto revealed.
"auto_reveal_entries": true
},
"prettier": {
// Use regular Prettier json configuration:
// "trailingComma": "es5",
// "tabWidth": 4,
// "semi": false,
// "singleQuote": true
},
// LSP Specific settings.
"lsp": {
// Specify the LSP name as a key here.
"rust-analyzer": {
// //These initialization options are merged into Zed's defaults
"initialization_options": {
"checkOnSave": {
"command": "clippy"
}
}
// }
}
}
}
|
I haven't tested the tab, so I'll test it.. |
Tab and c-y work well. The TAB is the default key, so you don't have to set it up separately. test02.-.SD.480p.mp4 |
@YoungHaKim7 Thanks a lot for clarifying! |
ctlr+y 자동완성 질문해서 해결함(추가로 세팅해서 해결) - 결국 물어봄 ㅠㅠ(해결완료) - zed-industries/zed#8707
I have set this in my config : {
"context": "Editor && showing_completions",
"bindings": {
"alt-l": "editor::ConfirmCompletion"
}
} But when copilot suggest code, pressing Alt + L doesn't do anything, and Tab still works. Does anyone have a similar issue ? |
This one worked for me: {
"context": "Editor && inline_completion && !showing_completions",
"bindings": {
"tab": "editor::Tab",
"cmd-enter": "editor::AcceptInlineCompletion"
}
} I use cmd + enter to accept inline completion. |
this didn't work for me using supermaven |
Check for existing issues
Describe the bug / provide steps to reproduce it
Hello, I'm trying to map the project panel back to Vim key binding, but I usually use ctrl-y when I do autocomplete on Neovim, but I don't think it's possible to do it on zed.
my neovim cmp setting
Environment
Zed: v0.124.8 (Zed)
OS: macOS 14.2.1 23C71 arm64
Memory: 16 GiB
Architecture: aarch64(M1 macPro)
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.If you only need the most recent lines, you can run the
zed: open log
command palette action to see the last 1000.No response
The text was updated successfully, but these errors were encountered: