Conrad Irwin
b29e295e1b
vim: Add multicursor shortcuts
...
- g n / g N to select next/previous
- g > / g < to select next/previous replacing current
- g a to select all matches
2023-09-25 15:32:03 -06:00
Conrad Irwin
b02bd9bce1
Fix Y on last line with no trailing new line
...
For zed-industries/community#2044
2023-09-15 11:14:04 -06:00
Conrad Irwin
1b1d7f22cc
Add visual area repeating
2023-09-07 10:45:38 -06:00
Conrad Irwin
20f98e4d17
vim . to replay
...
Co-Authored-By: maxbrunsfeld@gmail.com
2023-09-06 13:49:55 -06:00
Conrad Irwin
20aa2a4c54
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
1f3e009b32
Fix zed-industries/community#1950
2023-08-25 11:34:07 -06:00
Max Brunsfeld
404f76739c
Format let-else statements
2023-08-25 10:11:32 -07:00
Mikayla Maki
fbc7b37b2f
Introduce channel notes ( #2880 )
...

### Todo
* [x] Snapshot channel buffers when everyone closes the buffer
* [x] Ensure that users who are in both a project and a channel note
have the same color in both places
* [x] Allow following project collaborators into channel notes
* [x] Expose notes for the current channel under "Current Call" section
of the collaboration panel
* [x] Offline state for the channel notes view
* [x] Make the channel context menu accessible to all members (to expose
the notes)
* [x] Wire in view and Item method overrides
Release Notes:
- N/A
2023-08-24 18:01:28 -07:00
Max Brunsfeld
a95dcfa8bc
Make channel notes view searchable and navigable via pane history
...
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 17:18:18 -07:00
Conrad Irwin
e4794e3134
vim: Fix linewise copy of last line with no trailing newline
...
Along the way, delete the VimBindingTestContext by updating the
visual tests to no-longer need it.
2023-08-24 00:00:12 -06:00
Conrad Irwin
33d7fe02ee
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
b0ba0f8851
Fix visual objects
...
Adds 'a'/'i' in visual mode
2023-08-17 17:13:23 -06:00
Conrad Irwin
59d1a5632f
Fix edge-cases in visual block insert
2023-08-17 15:16:26 -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
Conrad Irwin
7598030102
Tidy-up
2023-08-16 22:29:28 -06:00
Conrad Irwin
7f06191c9f
Disable autoindent in visual block insert mode
2023-08-16 10:44:59 -06:00
Conrad Irwin
1b4dd49b1d
Vim visual block mode
...
This isn't quite an exact emulation, as instead of using one selection
that is magically in "column mode", we emulate it with a bunch of zed
multi-selections (one per line).
I think this is better, as it requires fewer changes to the codebase,
and lets you see the impact of any changes immediately on all lines.
Fixes : zed-industries/community#984
2023-08-15 16:00:50 -06:00
Conrad Irwin
1cc0798aea
Add a VisualBlock mode
...
Instead of trying to extend the Mode::Visual special case, just split
out into three different modes.
2023-08-15 10:00:45 -06:00
Conrad Irwin
5f6535e92b
TEMP
2023-08-02 15:06:46 +01:00
Conrad Irwin
645c149344
Fix visual selection of trailing newline
2023-07-28 22:38:39 -06:00
Conrad Irwin
0c15ef7305
Merge VisualChange -> Substitute
...
They both are supposed to work the same.
2023-07-28 15:32:02 -06:00
Conrad Irwin
e3788cc6e6
Add o/O for flipping selection
2023-07-28 15:26:40 -06:00
Conrad Irwin
3f2f3bb78d
Fix crash when deleting a long line in visual line mode
2023-07-28 15:26:40 -06:00
Conrad Irwin
5edcb74760
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
b53fb8633e
Fix vim selection to include entire range
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-07-28 15:26:40 -06:00
Julia
243a1a854e
Avoid panic from assuming a vim operator exists on the operator stack
2023-07-21 14:25:30 -04:00
Conrad Irwin
0cacf01f90
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
Antonio Scandurra
137d9384b5
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
868301bedb
WIP
2023-04-12 10:07:17 -06:00
Nathan Sobo
95eb918b4c
Fix broken test due to trimmed trailing whitespace during formatting
2023-04-06 16:10:39 -06:00
Nathan Sobo
de9bf6dfbd
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
eac33d732e
wip
2023-02-16 12:23:45 -08:00
Kay Simmons
3d53336916
More vim fixes and move some more things out of app.rs
2023-02-13 13:50:37 -08:00
Kay Simmons
216b1aec08
fix replace in normal and visual modes
2023-01-11 14:57:40 -08:00
Kay Simmons
14eec66e38
in progress
2023-01-11 12:10:55 -08:00
Kay Simmons
cffb064c16
Refactor editor scrolling and implement scroll commands from vim mode
2022-12-07 16:39:32 -08:00
Max Brunsfeld
718f802157
Implement Copy for multibuffer anchors
2022-11-28 14:18:49 -08:00
Mikayla Maki
53f8744794
Tried alternate stratergy
2022-11-08 11:54:26 -08:00
Kay Simmons
4977acf6a5
fix some vim mode bugs around deletions and failed motions
2022-11-02 01:20:11 -07:00
K Simmons
d1f1eb9a29
Add count argument to motion functions and add ability to jump to a given line
2022-10-11 16:27:54 -07:00
K Simmons
673041d1f5
working quote and bracket text objects
2022-10-11 15:17:29 -07:00
K Simmons
6a237deb21
Add some tests for portions of visual text objects. Note: they are slightly broken currently as described in the tests
2022-10-10 15:32:12 -07:00
K Simmons
d2494822b0
Add assertion context manager to TestAppContext and convert existing vim tests to use neovim backed test context
2022-10-10 14:46:07 -07:00
K Simmons
5fec8c8bfd
Enable verifying of visual mode selections in neovim backed tests
2022-10-09 01:19:22 -07:00
K Simmons
515c1ea123
Fixed some neovim test context issues, added repeated commands in vim mode, and ported some tests to use the neovim testing strategy
2022-10-08 21:52:07 -07:00
K Simmons
b82db3a254
Adds word and sentence text objects along with a new vim testing system which uses cached neovim data to verify our test accuracy
2022-10-08 21:51:49 -07:00
ForLoveOfCats
8ba2f77148
One big cleanup pass of clippy lints
...
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Max Brunsfeld
afcf5fc95b
Update vim mode tests to use new marked text format
2022-08-03 17:52:34 -07:00
Max Brunsfeld
868c460620
🎨 Rename and simplify some autoindent stuff
2022-07-28 22:40:30 -07:00
Max Brunsfeld
3a74290359
Merge branch 'main' into autoindent-on-paste
2022-07-28 15:09:18 -07:00