The replacement "g" didn't seem to work for everyone.
Closes#20912
Updates #20104
Release Notes:
- vim: Restores `dia` to mean "delete in argument" instead of "delete
within angle brackets". To keep this in your own keymap use:
```
{
"context": "vim_operator == a || vim_operator == i || vim_operator ==
cs",
"use_layout_keys": true,
"bindings": {
"a": "vim::AngleBrackets"
}
}
```
Follow-up of https://github.com/zed-industries/zed/pull/20507
Release Notes:
- (breaking Preview) Adjusted file finder split keybindings to be less
conflicting
Co-authored-by: Conrad Irwin <conrad@zed.dev>
Support has been added for the ctrl-o command within insert mode. Ctrl-o
is used to partially enter normal mode for 1 motion to then return back
into insert mode.
Release Notes:
- vim: Added support for `ctrl-o` in insert mode to enter temporary
normal mode
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Follow-up of https://github.com/zed-industries/zed/pull/20419
Release Notes:
- - (breaking change) Use `ctrl-right` instead of `cmd-right` as a macOS
default for `editor::AcceptPartialInlineCompletion` (Linux)
Closes #16343Closes#10972
Release Notes:
- (breaking change) On macOS when using a keyboard that supports an
extended Latin character set (e.g. French, German, ...) keyboard
shortcuts are automatically updated so that they can be typed without
`option`. This fixes several long-standing problems where some keyboards
could not type some shortcuts.
- This mapping works the same way as
[macOS](https://developer.apple.com/documentation/swiftui/view/keyboardshortcut(_:modifiers:localization:)).
For example on a German keyboard shortcuts like `cmd->` become `cmd-:`,
`cmd-[` and `cmd-]` become `cmd-ö` and `cmd-ä`. This mapping happens at
the time keyboard layout files are read so the keybindings are visible
in the command palette. To opt out of this behavior for your custom
keyboard shortcuts, set `"use_layout_keys": true` in your binding
section. For the mappings used for each layout [see
here](a890df1863/crates/settings/src/key_equivalents.rs (L7)).
---------
Co-authored-by: Will <will@zed.dev>
Both `editor::AcceptPartialInlineCompletion` and the keybinding for
`editor::MoveToEndOfLine` had the same keybinding inside the editor, and
with Supermaven's fast proposals, it's been very frequently used
incorrectly.
Closes #ISSUE
Release Notes:
- (breaking change) Use `ctrl-right` instead of `cmd-right` as a macOS
default for `editor::AcceptPartialInlineCompletion`
Closes https://github.com/zed-industries/zed/issues/20187
Make outline panel more eager to open its entries:
* scroll editor to selected outline entries (before it required an extra
`"outline_panel::Open", { "change_selection": false }` action call)
* make any `Open` action call to behave like `"outline_panel::Open", {
"change_selection": true }` and remove the redundant parameter.
Now opening an entry is equal to double clicking the same entry: the
editor gets scrolled and its selection changes
* add a way to open entries the same way as excerpts are open in multi
buffers (will open the entire file, scroll and place the caret)
* additionally, fix another race issue that caused wrong entry to be
revealed after the selection change
Release Notes:
- Improved outline panel keyboard navigation
Closes#7688
Release Notes:
- (breaking change) Stop binding keyboard shortcuts to alt-[a-z]. These
get in the way of typing characters. This is usually not an issue for
English speakers because we don't use many characters; but for other
Latin-based languages with diacritics our shortcuts prevent them typing
what they need to type.
This primarily affects Zed's extra features:
* `alt-q` => `cmd-k q` on maOS, `ctrl-k q` on Linux for `editor::Rewrap`
* `alt-z` => `cmd-k z` on macOS `ctrl-k z` on Linux for
`editor::ToggleSoftWrap`
* `alt-m` => `ctrl-shift-m` for `assistant::ToggleModelSelector`
* `alt-v` => `ctrl-shift-v` for `["editor::MovePageUp", {
"center_cursor": true }]` (macOS only)
* `alt-t` => `cmd-shift-r` on maOS, `ctrl-shift-r` on Linux for
`task::Spawn` (The previous binding for `editor::RevealInFileManager`
now only applies in the project panel)
* `alt-shift-t` => `alt-cmd-r` on maOS, `ctrl-alt-r` on Linux for
`task::Rerun`
* `alt-shift-f` => `ctrl-shift-f` for
`project_panel::SearchInDirectory`.
But also overrides some bindings from Readline.
* `alt-h` => `alt-backspace` for `editor::DeleteToPreviousWordStart`
* `alt-d` => `alt-delete` for `editor::DeleteToNextWordEnd`
* `alt-f` => `ctrl-f` for `editor:: MoveToNextWordEnd` (`ctrl-f` was
previously `editor::MoveRight`)
* `alt-b` => `ctrl-b` for `editor::MoveToNextWordStart` (`ctrl-b` was
previously `editor::MoveLeft`)
Note that `alt-t` and `alt-shift-t` have been kept as aliases (because
no-one complained about `t` yet; but we may remove them completely in
the future).
JetBrains IDE's use `ctrl-w` and `ctrl-shift-w` on Win/Linux and
`cmd-up` and `cmd-down` on mac to extend/shrink selections.
https://www.jetbrains.com/guide/java/tips/extend-selection/
Release Notes:
- Fixed extend/shrink selection on JetBrains keymap
Closes#19417
Release Notes:
- vim : Added `r` and `a` as aliases for `[` and `<` text objects
(copying vim-surround).
- vim: (breaking change) rebound the function argument text object to
`g`.
- vim: Fixed surrounds to allow `b`/`B`/`r`/`a` anywhere you could use
`(`, `{`, `[`, `<`.
---
- vim: Added `b`, `B`, `r`, `s`, `a` as aliases for `()`, `{}`, `[]`,
`<>` in vim surround mode.
- Adds a new `surround_alias` function where aliases are defined.
- This function is used in `find_surround_pairs` to substitute the
chosen text with the alias
- The keymap is also modified to add support for Square and Angle
brackets when changing surrounds. These two were added to follow the
example of Tim Pope's ubiquitous `vim-surround` plugin.
- I had to overwrite the `vim::Argument` keybind in order to do this. I
moved it to use the `g` modifier. I realize this is a breaking change
and will happily move the `vim::AngleBracket` keymap to a different
letter if you'd like to avoid this. I'm just trying to keep with
convention. Ideally, Users would be able to define surround aliases
themselves in the config file but that's a much bigger task than I'm
able to do right now.
- I also added tests for the new aliases.
Thanks for making such a clean and organized codebase. I was able to
find the relevant section of code rather quickly thanks to this.
Release Notes:
- vim: Add `ctrl-v`/`ctrl-q` to type any unicode code point. For example
`ctrl-v escape` inserts an escape character(U+001B), or `ctrl-v u 1 0 E
2` types ტ (U+10E2). As in vim `ctrl-v ctrl-j` inserts U+0000 not
U+000A. Zed does not yet implement insertion of the vim-specific
representation of the typed keystroke for other keystrokes.
- vim: Add `ctrl-shift-v` as an alias for paste on Linux
Add an edit button to the assistant. This is totally hacked in for now,
just to see how this would feel rendered simply in the UI.
![CleanShot 2024-10-24 at 16 26
14@2x](https://github.com/user-attachments/assets/e630d078-78b7-42d7-93f1-cf61c00bd20e)
cc @as-cii @danilo-leal
Release Notes:
- N/A
---------
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
I went with Cmd-Shift-Y on macOS (Ctrl-Shift-Y on Linux) for "yes accept
this individual hunk" - both are currently unused.
I went with Cmd-Shift-A on macOS (Ctrl-Alt-A on Linux) for "accept all
hunks" - both are unused. (Ctrl-Shift-A on Linux was taken, as is
Ctrl-Alt-Y, so although the pairing of Ctrl-Shift-Y and Ctrl-Alt-A isn't
necessarily obvious, the letters seem intuitive - "yes" and "all" - and
those key combinations don't conflict with anything.)
Release Notes:
- Added keybindings for applying hunks in Proposed Changes
<img width="247" alt="Screenshot 2024-10-25 at 12 47 00 PM"
src="https://github.com/user-attachments/assets/d6355621-ba80-4ee2-8918-b7239a4d29be">
This commit adds support for using the physical insert-button. First
click toggles insert mode and subsequent clicks toggle back and forth
between replace and insert mode.
Closes#19224
Release Notes:
- Added support for using the insert button for vim_mode.
This PR changes the SSH modal design so its more keyboard
navigation-friendly and adds the server nickname feature.
Release Notes:
- N/A
---------
Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Closes#7417
Release Notes:
- Added basic support for Alacritty's [vi
mode](https://github.com/alacritty/alacritty/blob/master/docs/features.md#vi-mode)
to the built-in terminal (which is using Alacritty under the hood.) The
vi mode can be activated with `ctrl-shift-space` and then supports some
basic motions to navigate through the terminal's scrollback buffer.
## Details
Leverages existing selection functionality from mouse_drag and the
ViMotion API of alacritty to add basic vi motions in the terminal.
Please note, this is only basic functionality (move, select, and yank to
system clipboard) and not a fully functional vim environment (e.g.
search, configurable keybindings, and paste). I figured this would be an
interim solution to the long term, more fleshed out, solution proposed
by @mrnugget.
Ctrl+Shift+Space to enter Vi mode while in the terminal (Same default
binding in alacritty)
Fixes some missing shortcuts from Tooltips like the project search,
buffer search, quick action bar, ....
https://github.com/user-attachments/assets/d3a0160a-8d6e-4ddc-bf82-1fabeca42d59
This should hopefully help new users learn and discover some nice
keyboard shortcuts
Release Notes:
- Display keyboard shortcuts inside tooltips in the project search,
buffer search etc.
Closes#6822
Updates #5142
Release Notes:
- Added new fold actions to toggle folds (`cmd-k cmd-l`), fold every
fold (`cmd-k cmd-0`) unfold every fold (`cmd-k cmd-j`) to fold
recursively (`cmd-k cmd-[`) and unfold recursively (`cmd-k cmd-]`).
- vim: Added `za` to toggle fold under cursor.
- vim: Added `zO`/`zC`/`zA` to open, close and toggle folds recursively
(and fixed `zc` to not recurse into selections).
- vim: Added `zR`/`zM` to open/close all folds in the buffer.
Release Notes:
- Added a new `assistant.inline_alternatives` setting to configure
additional models that will be used to perform inline assists in
parallel.
---------
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Roy <roy@anthropic.com>
Co-authored-by: Adam <wolffiex@anthropic.com>
Some notes:
- You can put the cursor on the start or end line with triple backticks,
it doesn't actually have to be inside the block.
- Placing the cursor outside of a code block does nothing.
- Code blocks are determined by counting triple backticks pairs from
either start or end of buffer, and nothing else.
- If you manually select something, the selection takes precedence over
any code blocks.
Release Notes:
- Added the ability to copy surrounding code blocks in the assistant
panel into the clipboard, or inserting them directly into the editor,
without manually selecting. Place cursor anywhere in a code block
(marked by triple backticks) and use the `assistant::CopyCode` action
(`cmd-k c` / `ctrl-k c`) to copy to the clipboard, or the
`assistant::InsertIntoEditor` action (`cmd-<` / `ctrl-<`) to insert into
editor.
---------
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Bennet <bennet@zed.dev>
This PR adds a keybinding for the `editor: rewrap` command.
It is bound to `alt-q`, by default. In Vim mode, it is bound to `g q`.
Release Notes:
- N/A
Release Notes:
- vim: Added `:diff` and `:revert` (that work with `'<,'>`) to open the
selected diff and revert it.
- vim: Added `d o` to open the diff and `d p` to revert (spiritually
similar to vim's do/dp, though obviously not the same)
- vim: Added `ctrl-p` and `ctrl-n` to summon the autocomplete menu in
insert mode.