Closes#4642
- Added the ability to switch to helix normal mode, with an additional
helix visual mode.
- <kbd>ctrl</kbd><kbd>h</kbd> from Insert mode goes to Helix Normal
mode. <kbd> i </kbd> and <kbd> a </kbd> to go back.
- Need to find a way to perform the helix normal mode selection with
<kbd> w </kbd>, <kbd>e </kbd>, <kbd> b </kbd> as a first step. Need to
figure out how the mode will interoperate with the VIM mode as the new
additions are in the same crate.
This reverts commit 614b3b979b.
This conflicts with the macOS `ctrl-fn-left/right` bindings for moving
windows around (new in Sequoia).
If you want these use:
```
{
"context": "Editor",
"bindings": {
"ctrl-home": "editor::MoveToBeginning",
"ctrl-end": "editor::MoveToEnd"
}
},
```
Release Notes:
- N/A
Co-Authored-By: Max <max@zed.dev>
Release Notes:
- vim: Added motions `[[`, `[]`, `]]`, `][` for navigating by section,
`[m`, `]m`, `[M`, `]M` for navigating by method, and `[*`, `]*`, `[/`,
`]/` for comments. These currently only work for languages built in to
Zed, as they are powered by new tree-sitter queries.
- vim: Added new text objects: `ic`, `ac` for inside/around classes,
`if`,`af` for functions/methods, and `g c` for comments. These currently
only work for languages built in to Zed, as they are powered by new
tree-sitter queries.
---------
Co-authored-by: Max <max@zed.dev>
Closes https://github.com/zed-industries/zed/issues/4351
![it_splits](https://github.com/user-attachments/assets/40de03c9-2173-4441-ba96-8e91537956e0)
Applies the same splitting mechanism, as Zed's central pane has, to the
terminal panel.
Similar navigation, splitting and (de)serialization capabilities are
supported.
Notable caveats:
* zooming keeps the terminal splits' ratio, rather expanding the
terminal pane
* on macOs, central panel is split with `cmd-k up/down/etc.` but `cmd-k`
is a "standard" terminal clearing keybinding on macOS, so terminal panel
splitting is done via `ctrl-k up/down/etc.`
* task terminals are "split" into regular terminals, and also not
persisted (same as currently in the terminal)
Seems ok for the initial version, we can revisit and polish things
later.
Release Notes:
- Added the ability to split the terminal panel
Closes#8628
Release Notes:
- Added support for resizing the current pane using vim keybinds with
the intention to follow the functionality of vim
- "ctrl-w +" to make a pane taller
- "ctrl-w -" to make the pane shorter
- "ctrl-w >" to make a pane wider
- "ctrl-w <" to make the pane narrower
- Changed vim pre_count and post_count to globals to allow for other
crates to use the vim count. In this case, it allows for resizing by
more than one unit. For example, "10 ctrl-w -" will decrease the height
of the pane 10 times more than "ctrl-w -"
- This pr does **not** add keybinds for making all panes in an axis
equal size and does **not** add support for resizing docks. This is
mentioned because these could be implied by the original issue
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Change the "Apply" and "Discard" buttons to match @danilo-leal's design!
Here are some different states:
### Cursor in the first hunk
Now that the cursor is in a particular hunk, we show the "Apply" and
"Discard" names, and the keyboard shortcut. If I press the keyboard
shortcut, it will only apply to this hunk.
<img width="759" alt="Screenshot 2024-11-23 at 10 54 45 PM"
src="https://github.com/user-attachments/assets/68e0f109-9493-4ca2-a99c-dfcbb4d1ce0c">
### Cursor in the second hunk
Moving the cursor to a different hunk changes which buttons get the
keyboard shortcut treatment. Now the keyboard shortcut is shown next to
the hunk that will actually be affected if you press that shortcut.
<img width="749" alt="Screenshot 2024-11-23 at 10 56 27 PM"
src="https://github.com/user-attachments/assets/59c2ace3-6972-4a60-b806-f45e8c25eaae">
Release Notes:
- Restyled Apply/Discard buttons
---------
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>
Fix cmd-pipe
Remove redudnant jetbrains/sublime keybinds (these exist as `cmd-{` and `cmd-}` under default vscode keymap) and were broken as part of the recent keybind changes.
Remove excess JSON whitespace from tests to make them more readable.
Closes https://github.com/zed-industries/zed/issues/21077
* BREAKING: rename `file_finder::OpenMenu` into
`file_finder::ToggleMenu`
* Display the keybinding for menu toggling when the menu is open
* Fix `enter` not working in the menu
Release Notes:
- Fixed enter not working and menu toggle binding not shown in the file
finder menu
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>