Marshall Bowers
86e31db1fb
Enable clippy::clone_on_copy ( #8728 )
...
This PR enables the
[`clippy::clone_on_copy`](https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_copy )
rule and fixes the outstanding violations.
Release Notes:
- N/A
2024-03-02 17:37:48 -05:00
Marshall Bowers
c27546f5f3
Enable clippy::single_char_pattern ( #8727 )
...
This PR enables the
[`clippy::single_char_pattern`](https://rust-lang.github.io/rust-clippy/master/index.html#/single_char_pattern )
rule and fixes the outstanding violations.
Release Notes:
- N/A
2024-03-02 17:04:59 -05:00
Mahdy M. Karam and Conrad Irwin
ac4870b45c
Add option to either use system clipboard or vim clipboard ( #7936 )
...
Release Notes:
- vim: Added a setting to control default clipboard behaviour. `{"vim":
{"use_system_clipboard": "never"}}` disables writing to the clipboard.
`"on_yank"` writes to the system clipboard only on yank, and `"always"`
preserves the current behavior. ([#4390
](https://github.com/zed-industries/zed/issues/4390 ))
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com >
2024-02-22 10:12:29 -07:00
Conrad Irwin and WindSoilder
9caf3c4cf5
Highlight selections on vim yank ( #7638 )
...
Fixes : #7311
Co-Authored-By: WindSoilder <WindSoilder@outlook.com >
Release Notes:
- Added a highlight on yanked text in vim normal mode
**or**
- N/A
Co-authored-by: WindSoilder <WindSoilder@outlook.com >
2024-02-09 16:18:09 -07:00
bc3ec60520
vim hml ( #7298 )
...
- Add a setting for `vertical_scroll_offset`
- Fix H/M/L in vim with scrolloff
Release Notes:
- Added a settings for `vertical_scroll_offset`
- vim: Fix H/M/L with various values of vertical_scroll_offset
---------
Co-authored-by: Vbhavsar <vbhavsar@gmail.com >
Co-authored-by: fdionisi <code@fdionisi.me >
2024-02-02 19:24:36 -07:00
Conrad Irwin
966514066d
Support "dtx" vim key combination when "x" is immediately to the right of the cursor ( #6830 )
...
Closes #4358
The bug originates on this line:
https://github.com/zed-industries/zed/blob/2751970cf856909897c6f3005536387ae4cbe606/crates/vim/src/motion.rs#L451
- When running "dtx" on "ˇabcx", the range to delete is 0 -> 2 ("abc")
- When running "dtx" on "abˇcx", the range to delete is 2 -> 2 ("c"), so
`new_point == point` and the function incorrectly returns `None` and "c"
is not deleted
- We need to disambiguate between the "not found" case and the "found
immediately to the right" case
- This bug does not apply to the backwards case ("dTx")
Release Notes:
- Fixed "dtx" vim key combination when "x" is immediately to the right
of the cursor (#4358 )
2024-01-28 19:46:14 -07:00
Brooks Swinnerton
99f6b27c1f
Update name of function to match other implementation
2024-01-28 15:20:50 -05:00
Brooks Swinnerton
349b9a73e1
Add support for u and U in vim visual mode
2024-01-28 15:13:09 -05:00
Brian Strauch
3307b8993c
vim: fix dtx when x is immediately to the right
2024-01-26 16:58:48 -08:00
Thorsten Ball
2edbfac197
When searching in visual mode switch to normal mode ( #4178 )
...
This matches Neovim behaviour by setting the mode to `Normal` when using
search while in visual mode.
Release Notes:
- Fixed Vim mode not switching to normal mode from visual mode when
using search (`/`) while in visual mode.
2024-01-21 08:42:47 +01:00
Mikayla
860e6cc756
Lock down test platform implementation
2024-01-20 15:03:36 -08:00
Thorsten Ball and Conrad
2832b149be
When searching in visual mode switch to normal mode
...
This matches Neovim behaviour by setting the mode to `Normal` when using
search while in visual mode.
Co-authored-by: Conrad <conrad@zed.dev >
2024-01-20 16:33:07 +01:00
Conrad Irwin
41f5141543
Don't toggle WHOLE_WORD in vim search ( #4165 )
...
Fixes */# in visual mode, and avoids setting up irritating state.
[[PR Description]]
Release Notes:
- vim: Improved `*` and `#` to not toggle Zed's search state. Instead we
now use the regex to identify start and end of words (more like vim).
2024-01-19 15:02:38 -07:00
Conrad Irwin
24e1246e74
Don't toggle WHOLE_WORD in vim search
...
Fixes */# in visual mode, and avoids setting up irritating state.
2024-01-19 10:58:55 -07:00
Max Brunsfeld
037768f80d
Merge branch 'main' into language-api-docs
2024-01-18 15:06:45 -08:00
Conrad Irwin
ee7b749e75
Fix some cases of broken repeat in vim
2024-01-18 13:20:08 -07:00
Mikayla Maki
607f2a7ba5
Add typo detection to CI ( #4107 )
...
Adding the typos crate to our CI will take some doing, as we have
several tests which rely on typos in various ways (e.g. checking state
as the user types), but I thought I'd take a first stab at fixing what
it finds.
Release Notes:
- N/A
2024-01-17 17:13:47 -08:00
Piotr Osiewicz and Kirill
f4f65e9c2c
Editor docs ( #4097 )
...
Release Notes:
- N/A
---------
Co-authored-by: Kirill <kirill@zed.dev >
2024-01-18 00:48:37 +01:00
Mikayla
0b43bd7c14
Fix typos detected by crate-ci/typos
2024-01-17 14:31:21 -08:00
Max Brunsfeld and Mikayla
450537ac2a
Remove 2 suffix for vim, diagnostics, go_to_line, theme_selector, command_palette, file_finder
...
Co-authored-by: Mikayla <mikayla@zed.dev >
2024-01-03 10:42:49 -08:00
Conrad Irwin
92e91e5b45
Fix some bugs with vim objects
...
- softwrap interaction
- correct selection if cursor is on opening marker
2023-10-22 21:44:34 -06:00
Conrad Irwin
83d315d720
Fix single column vim selections
2023-10-20 11:17:19 -06:00
Conrad Irwin
3d5cbcaad1
Refactor TextLayoutDetails construction
2023-10-18 22:56:11 -06:00
Conrad Irwin
ccc2c5fdd6
Use Horizontal ranges everywhere
2023-10-09 21:48:50 -06:00
Conrad Irwin
a1ae399638
Get the project running!
2023-10-09 21:48:31 -06:00
Conrad Irwin
b3ed440e5c
Fix panic in increment
2023-10-04 15:13:01 -06:00
Conrad Irwin
d0e5c86d31
vim: Fix some dw edge cases ( #3058 )
...
Release Notes:
- vim: Fix `dw` on the last word of a line, and on empty lines.
2023-09-28 15:32:29 -06:00
Conrad Irwin
43eda76653
vim increment ( #3054 )
...
- vim: add ctrl-a/ctrl-x for increment/decrement
2023-09-28 15:32:11 -06:00
Conrad Irwin
98914f1155
vim: Fix some dw edge cases
2023-09-27 23:09:09 -06:00
Conrad Irwin
a9f0d72019
vim: add ctrl-a/ctrl-x
...
For zed-industries/community#1411
For zed-industries/community#619
2023-09-27 19:49:31 -06:00
Conrad Irwin
6ca8f83ef0
ctrl-a/x for vim
2023-09-27 12:32:01 -06:00
Conrad Irwin
6fd4a8fcba
vim: Fix ctrl-u/ctrl-d
...
They should work by exactly half a screen, and also move the cursor.
2023-09-26 22:28:04 -06:00
Conrad Irwin
6e501de8e2
Code review changes
2023-09-20 21:29:45 -06:00
Conrad Irwin
89c569e0b1
Fix backward search from command
2023-09-20 20:44:42 -06:00
Conrad Irwin
e85104ab0b
Iron out some edge-cases
2023-09-20 20:44:42 -06:00
Conrad Irwin
12cbf801f3
Flesh out v1.0 of vim :
2023-09-20 20:44:41 -06:00
Kirill Bulatov
d2b0649378
Use standalone inlay background highlights
2023-09-14 22:08:12 +03:00
Conrad Irwin
09b589ba85
Remove another supported exemption
2023-09-12 12:48:36 -06:00
Conrad Irwin
e81673f3d8
Remove supported exception
...
(and refactor tests to be more linear)
2023-09-12 10:13:24 -06:00
Conrad Irwin
488b325f60
Fix 0 used in a count
2023-09-12 09:56:23 -06:00
Conrad Irwin
5c124b1fa7
Fix bug where cursors became invisible if replaying was interrupted
2023-09-11 20:56:22 -06:00
Conrad Irwin
b850e0b8a6
vim: ALlow counts on insert actions
...
This re-uses the existing repeat infrastructure.
2023-09-11 18:09:47 -06:00
Conrad Irwin
4aa2148f76
vim: Fix count handling to allow pre/post counts
...
Fixes 2yy, d3d, etc.
For zed-industries/community#970
For zed-industries/community#1496
2023-09-11 14:35:47 -06:00
Conrad Irwin
b191a50e72
Don't replay ShowCharacterPalette
2023-09-08 11:35:00 -06:00
Conrad Irwin
17c2ee6ed1
Add visual area repeating
2023-09-07 10:45:38 -06:00
Conrad Irwin
3f25df90d3
Make test more deterministic
...
Otherwise these pass only when --features=neovim is set
2023-09-06 14:14:49 -06:00
Conrad Irwin and
204e716a5d
vim . to replay
...
Co-Authored-By: maxbrunsfeld@gmail.com
2023-09-06 13:49:55 -06:00
Conrad Irwin
475925ea6c
vim S ( #2929 )
...
Release Notes:
- vim: Add `S` to substitute line ([#1897 ](https://github.com/zed-industries/community/issues/1897 )).
2023-09-05 09:39:08 -06:00
Conrad Irwin
c1953aca44
Use consistent naming
2023-09-02 19:52:18 -06:00
Conrad Irwin
48a79db963
vim: Add S to substitute line
...
For zed-industries/community#1897
2023-09-01 13:13:59 -06:00