Conrad Irwin
fbbf36d152
Merge branch 'main' into pixel-columns
2023-10-18 23:00:56 -06:00
Conrad Irwin
3d5cbcaad1
Refactor TextLayoutDetails construction
2023-10-18 22:56:11 -06:00
Conrad Irwin
503868680c
vim: Add shift-y
2023-10-10 18:46:49 -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
6ca8f83ef0
ctrl-a/x for vim
2023-09-27 12:32:01 -06:00
Conrad Irwin
12cbf801f3
Flesh out v1.0 of vim :
2023-09-20 20:44:41 -06:00
Conrad Irwin
09b589ba85
Remove another supported exemption
2023-09-12 12:48:36 -06:00
Conrad Irwin
488b325f60
Fix 0 used in a count
2023-09-12 09:56:23 -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
cec47cb01a
vim . to replay ( #2936 )
...
Release Notes:
- vim: Add `.` to replay
([#946 ](https://github.com/zed-industries/community/issues/946 ))
- vim: Fix `J` in visual mode, and with counts.
2023-09-08 11:52:35 -06:00
Conrad Irwin
298d072b93
Fix f,t on soft-wrapped lines
...
Also remove the (dangerously confusing) display_map.find_while
2023-09-08 10:16:46 -06:00
Conrad Irwin
1fb1c40f22
add vim-specific J (with repeatability)
2023-09-07 11:08:07 -06:00
Conrad Irwin
15f5cbe9fa
TEMP
2023-09-07 10:51:18 -06:00
Conrad Irwin
17c2ee6ed1
Add visual area repeating
2023-09-07 10:45:38 -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
48a79db963
vim: Add S to substitute line
...
For zed-industries/community#1897
2023-09-01 13:13:59 -06:00
Conrad Irwin
d614796305
Fix find_{,preceding}boundary to work on buffer text
...
Before this change the bounday could mistakenly have happened on a soft
line wrap.
Also fixes interaction with inlays better.
2023-08-29 18:03:29 -07:00
Conrad Irwin
b7fde801d7
A few more fixes for wrapped line motions
2023-08-25 14:40:04 -06:00
Conrad Irwin
389a5ebabc
vim: Fix relative line motion
...
Before this change up and down were in display co-ordinates, after this
change they are in fold coordinates (which matches the vim behaviour).
To make this work without causing usabliity problems, a bunch of extra
keyboard shortcuts now work:
- vim: `z {o,c}` to open,close a fold
- vim: `z f` to fold current visual selection
- vim: `g {j,k,up,down}` to move up/down a display line
- vim: `g {0,^,$,home,end}` to get to start/end of a display line
Fixes : zed-industries/community#1562
2023-08-25 14:40:04 -06:00
Conrad Irwin
21b6d69d61
Rewrite paste
...
- vim: support P for paste before
- vim: support P in visual mode for paste without overriding clipboard
- vim: fix position when using `p` on text copied outside zed
- vim: fix indentation when using `p` on text copied from zed
2023-08-22 13:27:57 -06:00
Conrad Irwin
03c12decbc
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
Conrad Irwin
e6f1a6f9a9
Merge VisualChange -> Substitute
...
They both are supposed to work the same.
2023-07-28 15:32:02 -06:00
Conrad Irwin
adc89d3418
Add support for visual ranges ending with a newline
...
These primarily happen when first entering visual mode, but can also
be created with objects like `vi{`.
Along the way fix the way ranges like `vi{` are selected to be more
similar to nvim.
2023-07-28 15:26:40 -06:00
Conrad Irwin and Max Brunsfeld
737efc0c9d
Fix vim selection to include entire range
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2023-07-28 15:26:40 -06:00
Conrad Irwin
0f8a1759ae
Quality of life shortcuts for code actions
2023-07-21 09:47:15 -06:00
Conrad Irwin
a29e2eb5d4
refactor: Remove G/Z Namespace support
...
This previously enabled things like `d g g` to work, but we can
fix that instead by not clearing out pending vim state on change.
Either way, it is unnecessary and causes some user-confusion
(zed-industries/community#176 ), so remove this code for now; and use
comments to organize the file a bit instead.
2023-07-21 09:47:14 -06:00
Conrad Irwin
1b1c0d472f
vim: ? to search backwards, and /<enter> to repeat search
2023-07-07 15:57:52 -06:00
Conrad Irwin
b4a01fb7dd
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
Nathan Sobo
1a5f35c7a2
Vim toggle case ( #2648 )
...
Release Notes:
- vim: Add ~ to toggle case
([#1410 ](https://github.com/zed-industries/community/issues/1410 ))
2023-06-27 04:13:24 -06:00
Conrad Irwin
72df76d5f0
vim: Add ~ to change case
...
Fixes : zed-industries/community#1410
2023-06-26 20:22:24 -06:00
Conrad Irwin
04a35ae515
vim: Fix scrolling
...
After #2641 we noticed that scrolling didn't take a count parameter.
The PageDown/PageUp logic was also broken by an additional -1 (for both
vim mode and not).
2023-06-26 13:29:14 -06:00
Max Brunsfeld
7739da3e85
Vim: substitute support ( #2641 )
...
Release Notes:
- vim mode now supports `s` for substitute
2023-06-23 12:58:14 -07:00
Conrad Irwin
99ccf2e91f
vim: substitute handles multibyte characters
...
And is now in its own file
2023-06-22 13:22:19 -06:00
Conrad Irwin
81edc7afc5
vim: Fix 1G
...
Before this change code could not distinguish between a user providing a
count of 1 and no count at all.
Fixes : zed-industries/community#710
2023-06-22 12:11:14 -06:00
Conrad Irwin and Nathan Sobo
59e3cb55a8
Add counts to subsitute (and all)
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2023-06-22 11:50:56 -06:00
Conrad Irwin
6e93f7407e
vim: Support s on selections and with multiple cursors
2023-06-21 15:44:19 -06:00
Conrad Irwin
0d7c2a88ce
vim: Add basic 's' support
2023-06-21 15:06:34 -06:00
Antonio Scandurra
b9bd4b8efb
Maintain scroll bottom when streaming assistant responses
2023-06-07 15:01:50 +02:00
Joseph Lyons
4b5a7ec94a
Fix typos
2023-06-02 22:02:19 -04:00
Nathan Sobo
49dd95e72e
Remove unnecessary replace
2023-04-20 15:26:48 -06:00
Nathan Sobo
8c4db131da
Fix remaining vim failures
2023-04-20 15:25:11 -06:00
Antonio Scandurra
8b5cdda569
Initialize the active editor when vim mode is enabled
...
Instead of waiting for a focus event. This makes more tests pass.
2023-04-20 14:02:40 -06:00
Nathan Sobo
d8eb1ac343
WIP
2023-04-12 10:07:17 -06:00
Antonio Scandurra
5f04261450
WIP
2023-04-12 15:55:43 +02:00
Nathan Sobo
d937660683
Merge MutableAppContext into AppContext
...
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06:00
Kay Simmons
24a448f00c
Fix enter in normal mode acting incorrectly
2023-02-23 13:40:31 -08:00
Kay Simmons
327c58fdc3
fix vim percent motion to better match the docs and observed behavior
2023-02-17 14:55:19 -08:00