5brian
60c420a2da
docs: Update vim features ( #28360 )
...
Follow up:
https://github.com/zed-industries/zed/pull/28044#issuecomment-2786769520
Adds
- Indent wise motions
- :ls
- :set
Release Notes:
- vim: Added documentation for indent-wise motions, `:ls`, and `:set`
2025-04-09 16:30:50 -04:00
5brian
ee6c33ffb3
Fix vim test keystroke ( #28406 )
...
I wrote the test wrongly in
https://github.com/zed-industries/zed/pull/28005 :
It should be `$` instead of `shift-4`, so it was just yanking from the
middle of the line instead of the newline character. Fixed it and
regenerated it.
Release Notes:
- N/A
2025-04-09 14:29:03 -06:00
5brian
b67d3fd21b
git_ui: Show disabled states in context menu ( #28288 )
...
Other elements in the git panel are shown as disabled when an action is
not actionable (For example: stage all, commit). Updating the context
menu to match this behavior when an action does nothing.
|Before|After|
|--|--|
|||
Release Notes:
- Git: Improved the Git panel context menu to show actions with no
effect as disabled.
2025-04-09 10:46:21 -04:00
5brian
246013cfc2
tab_switcher: Add keybind to close tab tooltip ( #27212 )
...
| prev | new |
|--|--|
|<img width="619" alt="image"
src="https://github.com/user-attachments/assets/53b14fd4-17ee-4336-81ca-30324d918e15 "
/>|<img width="620" alt="image"
src="https://github.com/user-attachments/assets/316699b3-295b-4f83-9fb1-b799f7c71d7f "
/>|
Release Notes:
- N/A
2025-04-08 15:57:36 -06:00
5brian
ea33d78ae4
vim: Fix visual line yank on newline char ( #28005 )
...
Problem:
When yanking in visual line on the newline char, the next line gets
yanked as well:
https://github.com/user-attachments/assets/40f332dd-19f5-445f-a30f-39d50167c46f
Changes:
Similar to visual delete, exclude the newline char from the selection in
line mode.
Release Notes:
- vim: Fixed visual line yank while on the newline character yanking
following line
2025-04-08 09:15:34 -06:00
5brian
e36a2f2739
vim: Add indent-wise motions ( #28044 )
...
Taken from:
https://github.com/jeetsukumaran/vim-indentwise?tab=readme-ov-file#movements-by-relative-indent-depth
> [- : Move to previous line of lesser indent than the current line.
> [+ : Move to previous line of greater indent than the current line.
> [= : Move to previous line of same indent as the current line that is
separated from the current line by lines of different indents.
> ]- : Move to next line of lesser indent than the current line.
> ]+ : Move to next line of greater indent than the current line.
> ]= : Move to next line of same indent as the current line that is
separated from the current line by lines of different indents.
Release Notes:
- vim: Added indent-wise motions `] -/+/=`
2025-04-08 09:07:37 -06:00
5brian
4f936d8100
vim: Fix exchange showing ccx in pending keys ( #28303 )
...
|Before|After|
|--|--|
|||
Changes:
Add vim exchange to the clear stack
Release Notes:
- N/A
2025-04-08 09:03:24 -06:00
5brian
d3abc61728
breadcrumbs: Update multibuffer to match singleton ( #28267 )
...
Before:
https://github.com/user-attachments/assets/a2c8fe84-14f6-4cda-b51a-5ada3e2523b6
After:
https://github.com/user-attachments/assets/559bcfe8-a40f-44cc-a626-b0544b6cea68
Release Notes:
- N/A
2025-04-07 20:26:55 +00:00
5brian
b4af5b2ce0
agent: Update thread label to use plural form ( #27971 )
...
Update thread label to match the other contexts.
|Before|After|
|--|--|
|||
Release Notes:
- N/A
2025-04-02 18:33:05 -04:00
5brian
95b963c87b
vim: Add :Git ( #27874 )
...
Just adding to the existing https://zed.dev/docs/vim#ex-commands
Captial G is not used by vim commands.
Release Notes:
- N/A
2025-04-01 15:12:36 -06:00
5brian
7984f0f11c
vim: Update :set ( #27805 )
...
Update VimSet commands to better match the other commands by displaying
the leading `:`:
|Before|After|
|--|--|
|||
Release Notes:
- N/A
2025-03-31 19:00:11 -06:00
5brian
051483200d
vim: Add :ls, :buffers ( #27797 )
...
https://neovim.io/doc/user/windows.html#%3Abuffers
Not exactly the same, but i think the zed equivalent would be the tab
switcher
Release Notes:
- vim: Added `:ls` and `:buffers`
2025-03-31 13:20:41 -06:00
5brian
27cafe5567
vim: Add :options, :map ( #27798 )
...
Add:
- [:options](https://neovim.io/doc/user/options.html#%3Aoptions ) to open
default settings
- :map to open default vim keymap
These aren't exactly the same as vim but i think it's a good equivalent
For map:
I can't find the docs for :map with no arguments, since the map docs
only shows the command bindings, but it opens the key mapping in vim.
https://neovim.io/doc/user/vimindex.html

Release Notes:
- vim: Added `:options` and `:map`
2025-03-31 13:19:55 -06:00
5brian
17aecfde6f
vim: Fix :ex, :exit ( #27755 )
...
`:exit` should be `:exi[t]` instead of `:ex[it]`, `:ex` has different
command
- https://neovim.io/doc/user/editing.html#%3Aex
- https://neovim.io/doc/user/editing.html#%3Aexit
Changes:
- Add `:ex` same as `:edit`
- Change `:ex[it]` to `:exi[t]`
Release Notes:
- N/A
2025-03-31 11:25:11 -06:00
5brian
84a8d48178
vim: Fix space not handling non-ascii characters ( #27053 )
...
Closes #26806
Changes: Clips the new point with `Bias::Right` like in
`saturating_right`
Release Notes:
- vim: Fixed `space` not handling non-ascii characters
2025-03-19 07:28:50 -06:00
5brian and Conrad Irwin
15d2420031
workspace::Open: Fix trapped cursor/selection on update (#25402 )
...
Closes #ISSUE
Issue: Selection index does not reset when the matches update, which can
lead to the selection getting trapped when that index does not exist in
the next matches.
https://github.com/user-attachments/assets/d3fab23f-750c-47fb-bd3b-a0c42f214c83
This is in workspace::Open with "use_system_path_prompts": false
Release Notes:
- N/A
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com >
2025-03-18 22:19:11 -06:00
brian tan
edeed7b619
workspace::Open: Highlight fuzzy matches (#26320 )
...
Partial: https://github.com/zed-industries/zed/issues/15398
Changes:
Adds highlighting to the matches when using `"use_system_path_prompts":
false`
| before | after |
|---|---|
|||
Release Notes:
- N/A
2025-03-12 22:54:38 +02:00
brian tan
ed6bf7f161
diagnostics: Fix losing focus when activating from diagnostics view ( #25517 )
...
Closes #25509
Changes:
- If active item is already diagnostics, don't try to focus it again.
Instead of not focusing, should it just not activate instead? Something
like:
if !workspace
.active_item(cx)
.map(|item| item.item_id() == existing.item_id())
.unwrap_or(false)
{
workspace.activate_item(&existing, true, true, window, cx);
}
Release Notes:
- N/A
2025-03-08 22:17:20 +00:00
brian tan and Conrad Irwin
22b1a02e23
vim: Implement <count>% motion ( #25839 )
...
Closes https://github.com/zed-industries/zed/discussions/25665
> Currently Zed is missing quite an useful Vim motion: <count>% (go to
{count} percentage in the file).
Description:
{count}% - Go to {count} percentage in the file, on the first non-blank
in the line linewise. To compute the new line number this formula is
used: ({count} * number-of-lines + 99) / 100 .
> [Link](https://neovim.io/doc/user/motion.html#N%25 ).
Release Notes:
- vim: Added `<count>%` motion
---------
Co-authored-by: Conrad Irwin <conrad@zed.dev >
2025-03-05 19:59:18 -07:00
brian tan
ff0bb1f389
vim: Fix insert before in visual modes ( #25603 )
...
Closes #22536
Changes:
- Visual and visual block: Cursor at start of selection.
- Visual line: Cursor at start on line.
- Uses different handling since the selection does not actually change
in vline.
Release Notes:
- vim: Fixed insert before (`shift-i`) in visual modes.
2025-03-04 21:58:01 -07:00
brian tan
3e64f38ba0
vim: Add support for toggling boolean values ( #25997 )
...
Closes #10400
Closes https://github.com/zed-industries/zed/issues/17947
Changes:
- Let vim::increment find boolean values in the line and toggle them.
Release Notes:
- vim: Added support for toggling boolean values with `ctrl-a`/`ctrl-x`
2025-03-05 03:00:44 +00:00
brian tan
f24c226af8
assistant_context_editor: Close menus on send ( #25440 )
...
Closes #ISSUE
Before:
https://github.com/user-attachments/assets/e63b6207-0c80-4fd6-99c0-febe3d639ba1
After:
https://github.com/user-attachments/assets/870f2c6d-9b7f-456d-a1e3-26e1c31b129d
Release Notes:
- N/A
2025-03-03 09:22:23 -03:00
5brian
472dde509f
Capitalize default slash command description ( #25794 )
...
Update default slash command to use description constant format from
https://github.com/zed-industries/zed/pull/18595 .
|Before|After|
|---|---|
|||
^ This is when you type slash in the assistant panel.
Release Notes:
- N/A
2025-02-28 00:20:50 -03:00
5brian
88baf171c3
docs: Add apostrophe ( #25624 )
...
Release Notes:
- N/A
2025-02-26 03:46:02 +00:00
5brian
cea06bc0ce
git_panel: Apply tooltip to checkbox instead of container ( #25533 )
...
Closes #ISSUE
Small tweak: The tooltip was activating on the icon
|Before|After|
|---|---|
|||
Release Notes:
- N/A
2025-02-25 00:28:35 -05:00
5brian
52f73e0c2d
vim: Refactor and fix multiline operations ( #25055 )
...
Changes:
- [x] Cursor at the start during yank operations on objects (`yip`,
`yab` etc).
- [x] Refactors this: Trim all leading and trailing whitespace from
inner multiline bracket selection.
- This leaves a nicely indented line when doing `ci{` `vi{d` etc
- [x] Checks for empty selection
- [x] Removed moving cursor to the start in visual bracket operations
This cleans up the previous implementation by providing a simpler check
in `surrounding_markers`, instead of calling a new function in
`expand_object`. No functionality was changed there except for handling
the empty selection and removing some cursor adjustments that should not
have been there after further testing.
Release Notes:
- N/A
2025-02-24 18:30:21 -07:00
5brian
bbb8d63de0
vim: Register backquote object ( #25502 )
...
Closes #25496
Release Notes:
- vim: Fixed operations on backtick quotes
2025-02-24 15:33:17 -07:00
5brian and Marshall Bowers
216a5e2998
file_icons: Associate .R files with R ( #24907 )
...
Closes #24899
Sorted using:
https://github.com/zed-industries/zed/pull/12487#issue-2325944879
Release Notes:
- N/A
Co-authored-by: Marshall Bowers <git@maxdeviant.com >
2025-02-14 16:30:09 -05:00
5brian
0a146793ea
vim: Prevent around word operations from selecting indentation ( #24635 )
...
Closes https://github.com/zed-industries/zed/issues/15323
Changes:
Added check for first word on line
Tested `v/c/d/y aw`. Matches standard neovim.
|initial|old|new|
|---|---|---|
|||
Release Notes:
- vim: Prevent around word operations from selecting indentation
2025-02-11 11:35:59 -07:00
5brian
236f51cddd
vim: Update vi{ ( #24601 )
...
Small fix: Following up on
https://github.com/zed-industries/zed/pull/24518 where i missed `vi{`.
Matching neovim(tree-sitter), `vi{` should not have the newline selected
(Now `vi{d`/`vi{c` can match `di{`/`ci{`).
Also moved the cursor to the start.
|prev|new|neovim|
|---|---|---|
||||
Release Notes:
- N/A
2025-02-10 22:26:26 -07:00
5brian
69d415c8d0
vim: Multiline operation improvements ( #24518 )
...
Closes #15711
Discussed changes to match neovim in
https://github.com/zed-industries/zed/pull/24481#issuecomment-2644504695
-- `vi{` matches neovim with treesitter instead of vanilla neovim.
Change and delete matches standard neovim.
Not sure if this is the best way to do it, implemented post processing
to change and delete objects.
I think another way would be adjust the range to trim the trailing
newline char on change and delete operations, instead of having to add
it back.
||Before|After|
|---|---|---|
|initial|||
| `vi{` |

|

|
| `ci{` |

|

|
| `di{` |

|

|
Release Notes:
- vim: Improved multi-line operations
2025-02-10 08:45:06 -07:00
5brian and Conrad Irwin
7bddb390ca
vim: Preserve trailing whitespace in inner text object selections ( #24481 )
...
Closes #24438
Changes: Adjusted loop to only trim whitespace between last newline and
closing marker, when using inner objects like `y/d/c i b`
| Start | Fixed `vib` | Previous `vib` |
| ---------- | ---------- | ---------- |
|

|

|

|
Release Notes:
- vim: Preserve trailing whitespace in inner text object selections
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com >
2025-02-08 02:50:34 +00:00
Brian Tan
85c3aec6e7
vim: Maintain block cursor for navigating/non-modifying operators ( #21502 )
...
The cursor shape now only changes to underline for operators that modify
text (like: delete, change, yank) while maintaining block shape for
navigation operators (like: find, till).
This better matches Vim/Nvim's behavior where the cursor only changes
shape when an operator that will modify text is pending.
Release Notes:
- vim: Improved cursor shape behavior to better match Vim
2024-12-13 19:06:18 -07:00
yoleuh
72afe684b8
assistant: Use a smaller icon for the "New Chat" button ( #21425 )
...
Assistant new chat icon is slightly larger than editor pane new icon.
Changes:
Adds `IconSize::Small` to assistant default size new chat icon, not
really noticeable, but matches the new icon in editor pane, and the
assistant dropdown menu that have icon size small.
|old|new|
|---|---|
|||
Release Notes:
- N/A
2024-12-02 16:48:20 -05:00
yoleuh
4d5415273e
Docs: Update developing zed docs to match ( #21379 )
...
Some changes just so the build docs for the different os matches each
other :)
macos:
- moved `rust wasm toolchain install` up under `rust install` (match
windows docs)
- add instructions to update rust if already installed (match windows
and linux docs)
windows:
- add `(required by a dependency)` to cmake install (match macos docs)
Release Notes:
- N/A
2024-12-01 10:59:29 +02:00
yoleuh
de55bd8307
Status bar: Reduce right tools lateral margin ( #21329 )
...
Closes #21316
| Before | After |
|--------|-------|
|
|
|
Changes:
changed `Base08` to `Base04` in `render_right_tools`
Release Notes:
- N/A
2024-11-29 10:56:32 -03:00
yoleuh
6dbe2ef10c
docs: Fix default value for relative_line_numbers in vim ( #21196 )
...

Changes:
`true` to `false`
Reasoning:
matches zed default settings as well as the settings changes portion of
the vim docs


Release Notes:
- N/A
2024-11-26 18:10:28 +02:00