Conrad Irwin
e356a7df09
vim2 compiling (but mostly commented out)
2023-12-08 18:47:14 +00:00
Piotr Osiewicz and Antonio
ae842f7bf2
Start out Copilot2;
...
Add hidden_action_types to CommandPaletteFilter.
WindowContext.available_actions now returns global actions as well.
Co-authored-by: Antonio <antonio@zed.dev >
2023-12-05 14:57:20 +01:00
Conrad Irwin
d1bef9f6f2
pixel columns ( #3052 )
...
@ForLoveOfCats and I found a few speedups that make this acceptably fast
(able to update ~10k selections in <100ms), so the remaining work here
is to fix the tests, and then ship!
Release notes:
- Updated up/down to work based on pixel positions
([#1966 ](https://github.com/zed-industries/community/issues/1966 ))
([#759 ](https://github.com/zed-industries/community/issues/759 ))
- vim: Fixed off-by-one in visual block mode
([2123](https://github.com/zed-industries/community/issues/2123 ))
2023-10-20 15:01:27 -06:00
Conrad Irwin and Marshall
2f44151be4
Add "workspace: Toggle Vim Mode"
...
Co-Authored-By: Marshall <elliott.codes@gmail.com >
2023-10-20 11:41:13 -06:00
Conrad Irwin
ccc2c5fdd6
Use Horizontal ranges everywhere
2023-10-09 21:48:50 -06:00
Joseph T. Lyons
d6a8dee1b2
Add enable vim mode checkbox to welcome screen
2023-10-08 20:07:59 -04:00
Max Brunsfeld
d7eea1c383
Switch .leader_replica_id -> .leader_peer_id
2023-09-29 14:16:38 -07:00
Max Brunsfeld
f5459e071e
Merge branch 'main' into allow-following-outside-of-projects
2023-09-29 14:15:33 -07:00
Conrad Irwin
4b61767fe0
vim: Fix accidental visual selection when following
2023-09-29 12:08:25 -06:00
Max Brunsfeld
0729b740c9
Merge branch 'main' into allow-following-outside-of-projects
2023-09-28 11:58:28 -07:00
0976bdc78d
Assign unique color indices to room participants, use those instead of replica_ids
...
Co-authored-by: Conrad <conrad@zed.dev >
Co-authored-by: Antonio <antonio@zed.dev >
2023-09-28 11:06:09 -07:00
Conrad Irwin
ee0a229996
Add vim-specific interactions to command
...
This mostly adds the commonly requested set (:wq and friends) and
a few that I use frequently
:<line> to go to a line number
:vsp / :sp to create a split
:cn / :cp to go to diagnostics
2023-09-20 20:44:26 -06:00
Conrad Irwin
f4883e4bd8
vim: Use explicit global, not default
2023-09-18 14:22:41 -06:00
Conrad Irwin
488b325f60
Fix 0 used in a count
2023-09-12 09:56:23 -06:00
Conrad Irwin
d0497dfdb7
Clear counts when switching modes
2023-09-11 18:30:31 -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
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
39b149d1f9
Preserve line mode selection on undo
...
This diverges from vim's behaviour (which collapses the
cursor to a single point on undo).
2023-08-17 15:40:27 -06:00
Conrad Irwin
82b40f4136
Fix edge-cases in visual block insert
2023-08-17 15:16:26 -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
17f8742a27
Disable autoindent in visual block insert mode
2023-08-16 10:44:59 -06:00
Conrad Irwin
d37246dee7
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
99321c01b7
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
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
Julia and Mikayla Maki
9f5ffa2b6e
Avoid panic by accessing view handle by global in wrong window
...
View handles are window specific but this global will be doing things
in all windows, that would cause a panic when it attempted to update
a status bar mode indicator in a background window
Co-Authored-By: Mikayla Maki <mikayla@zed.dev >
2023-07-27 18:53:05 -04:00
Conrad Irwin
44f4f14010
Add a mode indicator for vim ( #2763 )
...
Release Notes:
- vim: add a mode indicator
([#409 ](https://github.com/zed-industries/community/issues/409 ))
Now updated screenshots with @iamnbutler
<img width="1043" alt="Screenshot 2023-07-25 at 11 11 57"
src="https://github.com/zed-industries/zed/assets/94272/8301479a-8b58-42d8-81a1-bc40e1e0a4df ">
<img width="1043" alt="Screenshot 2023-07-25 at 11 12 00"
src="https://github.com/zed-industries/zed/assets/94272/89c3b8bd-9cbc-4fd7-ad10-dac5538ed3a3 ">
<img width="1043" alt="Screenshot 2023-07-25 at 11 12 12"
src="https://github.com/zed-industries/zed/assets/94272/adc87fe3-a720-4779-853b-df9443407046 ">
2023-07-25 20:18:23 -06:00
Conrad Irwin and Mikayla Maki
e81bab4e2e
A little refactor
...
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com >
2023-07-25 12:55:01 -06:00
Conrad Irwin and Nate Butler
8fd9cba675
Update status bar theming
...
Co-Authored-By: Nate Butler <iamnbutler@gmail.com >
2023-07-25 11:06:41 -06:00
Conrad Irwin
1fccc35107
Refactor mode indicator to remove itself
...
One of the problems we had is that the status_bar shows a gap between
items, and we want to not add an additional gap for an invisible status
indicator.
2023-07-24 09:51:54 -06:00
Conrad Irwin
6ef1e48a77
Add a mode indicator for vim
...
This is the second most common remaining complaint (after :w not
working).
Fixes : zed-industries/community#409
2023-07-21 16:06:14 -06:00
Conrad Irwin
5ddb6c1db0
vim: add , and ;
2023-07-21 09:50:22 -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
94bdefefbe
Fix enter in search
2023-07-20 20:48:36 -06:00
Conrad Irwin
6e6b7b87ca
vim: Don't enter visual mode in search/go to definition
...
Fixes : zed-industries/community#1514
Contributes: zed-industries/community#1284
2023-07-07 15:56:37 -06:00
Conrad Irwin
97d1701e1c
Remove editor::Cancel binding from vim
...
When you hit <escape> in the command palette, it first editor::Cancel
because the command palette is also a focused editor; this binding was
catching before the `menu::Cancel` that you probably want.
From looking at the uses of editor::Cancel it seems like the only way to
trigger this is with <escape> in an editor. Rather than trying to hook
into the existing editor cancel and add vim-specific behaviour, we'll
instead take responsibility for binding directly to <escape> when
necessary.
Fixes : zed-industries/community#1347
2023-07-03 15:26:39 -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
Max Brunsfeld
e7f85efbb8
Rename settings::register_setting -> settings::register
2023-05-17 15:06:11 -07:00
Max Brunsfeld
30e678a450
Remove optional path argument when getting settings
2023-05-17 15:05:20 -07:00
Max Brunsfeld
56f2ff64ed
Define language settings in the language crate
2023-05-16 17:29:53 -07:00
Max Brunsfeld
47c3504d22
Define vim_mode setting in vim crate
2023-05-10 12:59:24 -07:00
Antonio Scandurra
51542daadd
Filter out vim commands when vim mode is disabled
2023-05-04 14:52:34 +02:00
Antonio Scandurra
1b1f2a3e5e
Avoid re-allocating KeymapContext after every view notification
2023-05-04 12:04:30 +02:00
Antonio Scandurra
b8e92e6d6a
Remove stray dbg! statements
2023-04-21 10:49:47 +02: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