Commit graph

223 commits

Author SHA1 Message Date
Conrad Irwin
2ecbd97fe8
vim: Support count with [x and ]x (#22176)
Fixes: #21577
Fixes: #17245

Release Notes:

- vim: Add <count> support for [x/]x
2024-12-18 08:28:22 -07:00
geemili
7d80d1208c
vim: Add delete action to HelixNormal mode (#21544)
Related issue: https://github.com/zed-industries/zed/issues/4642

Release-Notes:

* N/A
2024-12-06 14:05:41 -07:00
Conrad Irwin
78ca297282
Make use_key_equivalents opt-in (#21662)
When revamping international keyboard shortcuts I wanted to make the
default to use key equivalents; in hindsight, this is not what people
expect.

Release Notes:

- (Breaking) In keymap.json `"use_layout_keys": true` is now the
default. If you want to opt-out of this behaviour, set
`"use_key_equivalents": true` to have keys mapped for your keyboard. See
[documentation](https://zed.dev/docs/key-bindings#non-qwerty-keyboards)

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-12-06 14:05:03 -07:00
Anthony Eid
7335f211fd
Add Project Panel navigation actions in netrw mode (#20941)
Release Notes:

- Added "[ c" & "] c" To select prev/next git modified file within the
project panel
- Added "[ d" & "] d" To select prev/next file with diagnostics from an
LSP within the project panel
- Added "{" & "}" To select prev/next directory within the project panel

Note:

I wanted to extend project panel's functionality when netrw is active so
I added some shortcuts that I believe will be helpful for most users. I
tried to keep the default key mappings for the shortcuts inline with
Zed's vim mode.

## Selecting prev/next modified git file

https://github.com/user-attachments/assets/a9c057c7-1015-444f-b273-6d52ac54aa9c


## Selecting prev/next diagnostics 

https://github.com/user-attachments/assets/d1fb04ac-02c6-477c-b751-90a11bb42a78

## Selecting prev/next directories (Only works with visible directoires)

https://github.com/user-attachments/assets/9e96371e-105f-4fe9-bbf7-58f4a529f0dd
2024-12-05 14:07:13 +01:00
Waleed Dahshan
8f08787cf0
Implement Helix Support (WIP) (#19175)
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.
2024-12-03 23:19:52 -07:00
Conrad Irwin
db34f29300
vim: Add == and fix = in the status bar (#21490)
cc @maxbrunsfeld

Release Notes:

- vim: Add ==
2024-12-03 14:18:19 -07:00
Conrad Irwin
75c9dc179b
Add textobjects queries (#20924)
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>
2024-12-03 10:37:01 -07:00
Max Brunsfeld
7c994cd4a5
Add AutoIndent action and '=' vim operator (#21427)
Release Notes:

- vim: Added the `=` operator, for auto-indent

Co-authored-by: Conrad <conrad@zed.dev>
2024-12-02 15:00:04 -08:00
Conrad Irwin
4e720be41c
Add ctrl-w _ and ctrl-w = (#21227)
Closes #ISSUE

Release Notes:

- vim: Add support for `ctrl-w _` and `ctrl-w =`
2024-11-26 16:45:38 -08:00
AidanV
f702575255
Add support for resizing panes using vim motions (#21038)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
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>
2024-11-26 16:24:29 -08:00
Helge Mahrt
57e4540759
vim: Add "unmatched" motions ]}, ]), [{ and [( (#21098)
Closes #20791

Release Notes:

- Added vim ["unmatched"
motions](1d87e11a1e/runtime/doc/motion.txt (L1238-L1255))
`]}`, `])`, `[{` and `[(`

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-11-26 14:08:54 -08:00
vultix
597e5f8304
vim: Add indent text object (#21121)
Added support for the popular vim
[indent-text-object](https://github.com/michaeljsmith/vim-indent-object).
This is especially useful in indentation-sensitive languages like
python.

Release Notes:

- vim: Added `vii`, `vai` and `vaI` for selecting
[indent-text-object](https://github.com/michaeljsmith/vim-indent-object)s.
2024-11-26 12:54:36 -08:00
Conrad Irwin
37a59d6b2e
vim: Fix : on welcome screen (#20937)
Release Notes:

- vim: Fixed `:` on the welcome screen
2024-11-20 19:21:22 -07:00
Conrad Irwin
e0761db62d
Revert: "a" for "vim::AngleBrackets" (#20918)
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"
        }
    }
    ```
2024-11-20 13:46:44 -07:00
Axel Carlsson
b1cd9e4d24
vim: Add support for temporary normal mode (ctrl-o) within insert mode (#19454)
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>
2024-11-13 12:44:41 -07:00
Conrad Irwin
ff4f67993b
macOS: Add key equivalents for non-Latin layouts (#20401)
Closes  #16343
Closes #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>
2024-11-08 13:05:10 -07:00
Conrad Irwin
73bbdd4456
Allow vim macros in visual mode (#20261)
Closes #19764

Release Notes:

- vim: Fixed `q` and `@` in visual mode
2024-11-05 15:52:02 -07:00
Conrad Irwin
236498408f
Use zed-style shifted letters (#20254)
Release Notes:

- vim: Fixed some shortcuts to render correctly in Command
2024-11-05 15:51:52 -07:00
Mike Lloyd
f0aeab7d00
Add surround aliases (#20104)
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.
2024-11-04 09:03:27 -07:00
Conrad Irwin
ea08026cd0
vim: Make window shortcuts work in other contexts (#20058)
Closes #18552

Release Notes:

- vim: Extended `ctrl-w` to work in non-editor contexts (like markdown
preview, or screen shares)
2024-10-31 23:49:43 -06:00
Conrad Irwin
75f1862268
vim: Add (half of) ctrl-v/ctrl-q (#19585)
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
2024-10-31 23:25:42 -06:00
Axel Carlsson
a77ec94cbc
vim: Add support for insert button (#19245)
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.
2024-10-16 12:11:17 +02:00
Frank Sheiness
5b207ba238
vim: Add some "z" keybindings for scrolling (#18928)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Release Notes:

- vim: Added a few "z" keybindings for scrolling
2024-10-14 10:00:37 +02:00
Conrad Irwin
1be3c44550
vim: Support za (#18421)
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.
2024-09-26 23:52:07 -06:00
Sergio C.
4a4d8c1cab
vim: Add ability to spawn multicursors at beginning/end of line (#18183)
Closes #17842

Release Notes:

- Added the ability to spawn multiple cursors through the g-A and g-I
motions while in visual select mode.
2024-09-24 10:21:57 -06:00
Conrad Irwin
45388805ad
vim: gq (#18156)
Closes #ISSUE

Release Notes:

- vim: Added gq/gw for rewrapping lines
2024-09-20 13:02:39 -06:00
Marshall Bowers
ee8668ef45
Bind editor::Rewrap to alt-q (#17953)
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
2024-09-17 13:33:09 -04:00
KorigamiK
ae3880e71a
Add ability to open files with system default application (#17231) 2024-09-10 14:36:36 -04:00
Vishal Bhavsar
89ae97e5e9
vim: Revert 'Y' to yank to end of line (#17563)
Closes https://github.com/zed-industries/zed/issues/17549
2024-09-08 08:38:00 -06:00
Conrad Irwin
a7da16d192 vim: Fix ctrl-n/p 2024-09-06 18:48:06 -06:00
Conrad Irwin
6af5fdd1c2
vim: Add more diff stuff (#17456)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
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.
2024-09-05 20:35:04 -06:00
Conrad Irwin
1e09884a22
vim: Sentence motion (#17425)
Closes #12161

Release Notes:

- vim: Added `(` and `)` for sentence motion
2024-09-05 11:18:52 -06:00
CharlesChen0823
072513f59f
outline_panel: Fix j and k not working in outline panel filter (#17293)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Closes #17248

Release Notes:

- Fixed outline panel filter not working for certain Vim bindings
([#17248](https://github.com/zed-industries/zed/issues/17248))
2024-09-04 11:27:07 +02:00
Conrad Irwin
c697eaba82
Use split direction preferences more (#16679)
Use new split direction preferences in more places (#16345)

Release Notes:

- N/A
2024-08-22 11:13:33 -06:00
Thorsten Ball
db0c1fd592
vim: Add 'gf' command, make files cmd-clickable (#16534)
Release Notes:

- vim: Added `gf` command to open files under the cursor.
- Filenames can now be `cmd`/`ctrl`-clicked, which opens them.

TODOs:

- [x] `main_test.go` <-- works
- [x] `./my-pkg/my_pkg.go` <-- works
- [x] `../go.mod` <-- works
- [x] `my-pkg/my_pkg.go` <-- works
- [x] `my-pkg/subpkg/subpkg_test.go` <-- works
- [x] `file\ with\ space\ in\ it.txt` <-- works
- [x] `"file\ with\ space\ in\ it.txt"` <-- works
- [x] `"main_test.go"` <-- works
- [x] `/Users/thorstenball/.vimrc` <-- works, but only locally
- [x] `~/.vimrc` <--works, but only locally
- [x] Get it working over collab
- [x] Get hover links working

Demo:



https://github.com/user-attachments/assets/26af7f3b-c392-4aaf-849a-95d6c3b00067

Collab demo:




https://github.com/user-attachments/assets/272598bd-0e82-4556-8f9c-ba53d3a95682
2024-08-22 14:27:11 +02:00
Conrad Irwin
bd59af1df5
vim: Support ranges in command (#15985)
The most requested feature here is "search and replace in visual mode",
but as a happy side effect we can now support things like :2,12j to join
those lines, and much much more.



Release Notes:

- vim: Added support for range syntax in command
([#9428](https://github.com/zed-industries/zed/issues/9428)).
- vim: Prefill command with `:'<,'>` from visual mode
([#13535](https://github.com/zed-industries/zed/issues/13535)).
2024-08-08 21:47:27 +01:00
Luis Cossío
7b5fdcee7f
lsp: Support Goto Declaration (#15785)
Adds support for [Goto
Declaration](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_declaration)
LSP command.

I am particularly interested in [this for Rust
projects](https://rust-analyzer.github.io/manual.html#go-to-declaration),
to be able to navigate to the place where a trait method is declared,
coming from a trait method implementation.

I noticed this was something I could do in VSCode before, but was
somehow missing is Zed. Thanks to the already existing infrastructure
for Goto Definition, I just followed and copy-paste-adapted it for Goto
Declaration.

As a bonus, I added `ctrl-F12` and `alt-ctrl-F12` as default macOS
keybindings for `GoToDeclaration` and `GoToDeclarationSplit`,
respectively. They are not keybindings from another editor, but I
figured they made sense to be grouped along with the other *F12
commands.

### Release Notes:

- Added "Go to declaration" editor action.
- vim: Breaking change to keybindings after introduction of the `Go to
declaration` editor action. The new keybindings are the following (and
can be found [here](https://zed.dev/docs/vim), alongside the other key
bindings):
  - `g d` - Go to definition
  - `g D` - Go to declaration
  - `g y` - Go to type definition
  - `g I` - Go to implementation




https://github.com/user-attachments/assets/ee5c10a8-94f0-4e50-afbb-6f71db540c1b

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-08-06 11:20:51 +02:00
Benjamin Davies
26d0a33e79
Add Vim digraphs (#14887)
Vim digraphs are a way to insert special characters using sequences of
two ASCII characters. I've implemented the feature using a new `Digraph`
operator, following the example of `AddSurrounds`. There are still a few
issues that I'm not sure what the best way to resolve them is.

- To insert `ş`, the user must pause between pressing `ctrl-k` and `s
,`, otherwise it triggers the binding for `ctrl-k s`. Is there a way to
disable `ctrl-k *` bindings while in insert, replace or waiting mode?
- Is there a better way to insert a string at all of the cursors? At the
moment I'm constructing the edits manually.
- The table of default digraphs is a 1.4k line rust expression. Is this
okay as long as it's in its own module?
- I'd like a second opinion on how best to structure the settings.json
entry.
- I have omitted the "meta character" feature as I don't think it makes
sense when editing UTF-8 text.

Release Notes:

- Added support for Vim digraphs.

Resolves #11871
2024-07-28 22:44:32 -06:00
Benjamin Westphal
1fae99a7c4
vim: Add motion support for toggle comments (#14919)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
### Summary

This PR adds support for count and object motions to the toggle comments
action in Vim mode. The relevant issue is
[#14337](https://github.com/zed-industries/zed/issues/14337).

For example, `2 g c j` will toggle comments three lines downward. `g c g
g` will toggle comments from the current cursor position up to the start
of the file.

Notably missing from this PR are `g c b` (toggle comments for the
current block) as well as `g c p` (toggle comments for the current
paragraph). These seem to be non-standard.

The new module `normal/toggle_comments.rs` has been copied almost
verbatim from `normal/indent.rs`. Maybe that ought to be abstracted over
but I feel I lack the overview.

Release Notes:

- vim: Added support for count and object motion to the toggle comments
action ([#14337](https://github.com/zed-industries/zed/issues/14337)).
2024-07-22 21:22:10 -06:00
0x2CA
bf4645b1fe
Fix vim <CTRL-J> slines downward linewise, Not Join Lines (#14796)
https://vimhelp.org/motion.txt.html#CTRL-J

Release Notes:

- vim: Added `ctrl-j` as a new binding that's equivalent to `j`.
2024-07-19 11:52:37 +02:00
Vishal Bhavsar
be45f32753
vim: Fix 'Y' to yank to end of line (#14783)
Instead of yanking the entire line.

Release Notes:

- vim: Updated `Y` to yank to end of line (like neovim)
https://github.com/zed-industries/zed/issues/14771
2024-07-18 22:34:40 -06:00
Conrad Irwin
76594ae5cd
vim: fix escape while waiting (#14595)
Follow up from #14233

Release Notes:

- N/A
2024-07-16 14:08:05 -06:00
sherwyn
e402d7e96a
vim: Add support for vim::PreviousLineStart motion (#14193)
Release Notes:

- vim: Added `-`/`+` to go to beginning of line above/below
([#14183](https://github.com/zed-industries/zed/issues/14183)).
- vim: (Breaking) Removed non-standard builtin binding from `-` to open
the project panel. You can re-add it to your keymap file with:
`{"context":"VimControl", "bindings":{ "-":
"pane::RevealInProjectPanel"}}`


Optionally, include screenshots / media showcasing your addition that
can be included in the release notes.


https://github.com/zed-industries/zed/assets/32429059/0e9e9348-265e-4a81-a45a-4739034dc5d9

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-07-11 16:36:07 -06:00
Conrad Irwin
b0dbc80575
vim: (BREAKING) clean up keymap contexts (#14233)
Release Notes:

- vim: (BREAKING) Improved vim keymap contexts.

Previously `vim_mode == normal` was true even when operators were
pending, which led to bugs like #13789 and a requirement for custom
keymaps to exclude various conditions like (`!VimObject` and
`!VimWaiting`) to avoid bugs.

Now `vim_mode` will be set to `operator` or `waiting` in these cases as
described in [the docs](https://zed.dev/docs/vim#keybindings). For most
custom keymaps this change will be a no-op or an improvement, but if you
were deliberately relying on the old behaviour (if you were relying on
`VimObject` or `VimWaiting` becoming true) you will need to update your
keymap.

---------

Co-authored-by: Thorsten <thorsten@zed.dev>
2024-07-11 13:16:26 -06:00
Thorsten Ball
7ef64fe6db
vim: Add ctrl-m binding (equivalent to <CR>) (#14057)
Now that we have macros I noticed how much I rely on this.

Release Notes:

- vim: `ctrl-m` now is equivalent to `enter` in editor.
2024-07-10 16:31:54 +02:00
francesco-gaglione
2dd486733b
Reveal in files instead of Finder (#13432)
fixes: #12776 

Release Notes:

- Renamed `editor::RevealInFinder` to `editor::RevealInFileManager`

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-07-09 11:54:14 -07:00
Matt Fellenz
034d905435
Allow vim counts with undo and redo (#13950)
These were previously passed directly to the editor module, which knows
nothing about vim counts. Instead, implement new actions in the vim
module which take the count and use it to invoke the corresponding
action in the editor module, properly repeated.

Release Notes:

- Fixed vim undo and redo commands not taking counts.
2024-07-08 23:16:52 -06:00
Conrad Irwin
0d7bd0c535
vim: Disable default ctrl-x/ctrl-w on linux (#13966)
Release Notes:

- N/A
2024-07-08 22:36:21 -06:00
Peter Tripp
813cc3f5e5
Keymap oneliners (#13887)
Some checks failed
CI / Check formatting and spelling (push) Has been cancelled
CI / (macOS) Run Clippy and tests (push) Has been cancelled
CI / (Linux) Run Clippy and tests (push) Has been cancelled
CI / (Windows) Run Clippy and tests (push) Has been cancelled
Deploy Docs / Deploy Docs (push) Has been cancelled
CI / Create a macOS bundle (push) Has been cancelled
CI / Create a Linux bundle (push) Has been cancelled
CI / Create arm64 Linux bundle (push) Has been cancelled
This is should be a no-op, whitespace formatting only.
Removes 425 lines of excess whitespace in our default keymap json files.

Release Notes:

- Improved formatting of default keymaps (single line per bind)
2024-07-05 22:00:18 -04:00
Xiaoguang Wang
48763d0663
vim: Add vim bindings for outline panel (#13763)
Release Notes:

- vim: Add vim bindings for outline panel #13763
2024-07-03 09:23:52 -06:00