Conrad Irwin
f550f23b97
vim test redux ( #11709 )
...
This cleans up the neovim-backed vim tests:
- removed exempted tests (we'll rely on bug reports to find missing edge
cases)
- moved all assertions into non-async fn's so that failures are
reporting on the right file/line
- removed the NeovimBackedBindingTestContext
- renamed a few things to make them clearer
- reduced the number of permutations tested in some cases to reduce
slowest test from 60s to 5s
Release Notes:
- N/A
2024-05-11 14:04:05 -04:00
Kirill Bulatov
df41435d1a
Introduce DisplayRow, MultiBufferRow newtypes and BufferRow type alias ( #11656 )
...
Part of https://github.com/zed-industries/zed/issues/8081
To avoid confusion and bugs when converting between various row `u32`'s,
use different types for each.
Further PRs should split `Point` into buffer and multi buffer variants
and make the code more readable.
Release Notes:
- N/A
---------
Co-authored-by: Piotr <piotr@zed.dev>
2024-05-11 00:06:51 +03:00
Danny Hua
bc736265be
support vim replace command with range ( #10709 )
...
Release Notes:
- Added support for line ranges in vim replace commands #9428
- not supporting anything other than bare line numbers right now
- ~need to figure out how to show range in question in search bar~
@ConradIrwin implemented showing a highlight of the selected range for a
short direction instead
- ~tests lol~
2024-04-29 18:49:30 -06:00
Conrad Irwin
6d7332e80c
Fix panic in vim search ( #11022 )
...
Release Notes:
- vim: Fixed a panic when searching
2024-04-25 20:32:15 -06:00
Conrad Irwin
904b740e16
More vim-like regexes ( #10577 )
...
Fixes: #10539
Release Notes:
- vim: Use `\<` `\>` instead of `\b`
2024-04-15 14:26:05 -06:00
Conrad Irwin
08786fa7bf
Make BufferSearch less wide ( #10459 )
...
This also adds some "responsiveness" so that UI elements are hidden
before everything has to be occluded
Release Notes:
- Improved search UI. It now works in narrower panes, and avoids
scrolling the editor on open.
<img width="899" alt="Screenshot 2024-04-11 at 21 33 17"
src="https://github.com/zed-industries/zed/assets/94272/44b95d4f-08d6-4c40-a175-0e594402ca01 ">
<img width="508" alt="Screenshot 2024-04-11 at 21 33 45"
src="https://github.com/zed-industries/zed/assets/94272/baf4638d-427b-43e6-ad67-13d43f0f18a2 ">
<img width="361" alt="Screenshot 2024-04-11 at 21 34 00"
src="https://github.com/zed-industries/zed/assets/94272/ff60b561-2f77-49c0-9df7-e26227fe9225 ">
<img width="348" alt="Screenshot 2024-04-11 at 21 37 03"
src="https://github.com/zed-industries/zed/assets/94272/a2a700a2-ce99-41bd-bf47-9b14d7082b0e ">
2024-04-11 23:07:29 -06:00
Conrad Irwin
f327118e06
vim: Allow search with operators & visual mode ( #10226 )
...
Fixes : #4346
Release Notes:
- vim: Add search motions (`/,?,n,N,*,#`) in visual modes and as targets
for operators like `d`,`c`,`y`
([#4346 ](https://github.com/zed-industries/zed/issues/4346 )).
2024-04-08 15:20:14 -06:00
Thorsten Ball
87be105af7
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
0479ebc26d
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
Mikayla
57400e9687
Fix typos detected by crate-ci/typos
2024-01-17 14:31:21 -08:00
Max Brunsfeld
252694390a
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
32f8733313
Code review changes
2023-09-20 21:29:45 -06:00
Conrad Irwin
a59da3634b
Fix backward search from command
2023-09-20 20:44:42 -06:00
Conrad Irwin
a25fcfdfa7
Iron out some edge-cases
2023-09-20 20:44:42 -06:00
Conrad Irwin
2d9db0fed1
Flesh out v1.0 of vim :
2023-09-20 20:44:41 -06:00
Kirill Bulatov
890a587254
Use standalone inlay background highlights
2023-09-14 22:08:12 +03:00
Conrad Irwin
7daed1b2c3
Fix 0 used in a count
2023-09-12 09:56:23 -06:00
Conrad Irwin
cee549e1ef
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
d1aa82bb48
vim visual block ( #2849 )
...
Release notes:
- vim: add Visual Block mode
([#984 ](https://github.com/zed-industries/community/issues/984 )),
([#1415 ](https://github.com/zed-industries/community/issues/1415 )).
- vim: add support for `a<object>` and `i<object>` in visual modes
- vim: fix scroll shortcuts (`ctrl-{f,b,d,u,e,y}`) in visual modes
- allow `shift-enter` to type a newline.
2023-08-18 09:55:40 -06:00
Conrad Irwin
3514816ece
Store some vim state per-editor
...
This fixes a bug where opening and closing command would reset your
selection incorrectly.
2023-08-17 14:09:47 -06:00
Piotr Osiewicz
343e9d080e
Finish migration to modes for buffer search
2023-08-08 15:57:07 +02:00
Piotr Osiewicz
c53554ead3
Remove SearchOptions::REGEX.
...
A bit WIP as it awaits migration of buffer search to modes
2023-08-08 14:42:11 +02:00
Max Brunsfeld
a127b0d3e6
Fix warnings surfaced in Rust 1.71
2023-08-02 09:19:23 -07:00
Kirill Bulatov
646dabe113
Add buffer search history
2023-08-01 01:31:28 +03:00
Conrad Irwin
807279208d
Fix shift-enter in search
...
If you want to type a newline in an auto_height editor, ctrl and
ctrl-shift are your friends.
2023-07-21 09:10:12 -06:00
Conrad Irwin
7337910034
Fix enter in search
2023-07-20 20:48:36 -06:00
Conrad Irwin
c9bf407431
Avoid optional on select_match
2023-07-17 12:49:59 -06:00
Conrad Irwin
b4b0f622de
Rebuild vim search experience on refactored code
2023-07-07 15:57:54 -06:00
Conrad Irwin
232d14a3ae
Make search less magic
...
Co-Authored-By: Antonio <antonio@zed.dev>
2023-07-07 15:57:54 -06:00
Conrad Irwin
dea728a7e5
Better waiting in tests
2023-07-07 15:57:54 -06:00
Conrad Irwin
6cf13c62d1
vim: ? to search backwards, and /<enter> to repeat search
2023-07-07 15:57:52 -06:00
Conrad Irwin
dbec2ed1f1
vim: add */#/g*/g# for jumping to next word
...
As in vim, this toggles the normal search experience.
2023-07-07 15:57:35 -06:00