Peter Tripp
735849e201
Improve Editor::DuplicateSelection ( #21976 )
...
Improves the new `Editor::DuplicateSelection` @CharlesChen0823 added in
https://github.com/zed-industries/zed/pull/21154 .
- Merge `duplicate_selection` and `duplicate_line` into single function.
- Add keyboard shortcuts to JetBrains and SublimeText keymaps.
- If the selection is empty (e.g. just a cursor) make
`Editor::DuplicateSelection` fallback to being the same as
`Editor::DuplicateLineDown`.
- Tested with multiple cursors and for multiple selections.
| Editor | Action | macOS | Linux |
| ----------- | ------------------- | ----------- | ------------ |
| VSCode | Duplicate Selection | | |
| JetBrains | Duplicate Selection | cmd-d | ctrl-d |
| XCode | Duplicate | cmd-d | N/A |
| SublimeText | duplicate_line | cmd-shift-d | ctrl-shift-d |
This matches behavior of the `duplicate` functionality in all other
major editors, with one exception: other editors change the selection so
that the newly duplicated object, current Zed behavior leaves the
original selection unchanged (TODO?)
2024-12-13 16:32:33 -05:00
..
2024-11-11 10:18:38 +01:00
2024-11-15 07:37:31 +01:00
2024-12-13 14:23:02 -05:00
2024-12-13 15:03:55 -05:00
2024-11-22 19:02:32 -05:00
2024-11-25 18:26:34 -05:00
2024-11-25 19:44:34 -05:00
2024-11-28 10:58:36 +02:00
2024-11-21 14:11:57 -05:00
2024-11-21 14:11:57 -05:00
2024-12-12 15:20:21 -08:00
2024-11-19 08:23:12 -07:00
2024-11-28 10:58:10 +02:00
2024-12-09 14:26:36 +01:00
2024-11-19 08:23:12 -07:00
2024-12-11 14:05:10 -07:00
2024-12-13 14:23:02 -05:00
2024-12-13 14:23:02 -05:00
2024-11-13 13:55:06 -08:00
2024-12-04 10:45:25 -05:00
2024-11-25 18:26:34 -05:00
2024-12-11 13:21:40 -05:00
2024-12-09 21:56:43 -07:00
2024-12-13 16:32:33 -05:00
2024-11-20 16:52:38 -08:00
2024-12-02 15:01:09 -03:00
2024-12-10 15:04:47 -05:00
2024-11-01 13:20:30 -04:00
2024-12-11 14:05:10 -07:00
2024-12-13 14:23:02 -05:00
2024-12-11 22:13:52 -05:00
2024-11-21 15:24:04 -05:00
2024-12-13 14:23:02 -05:00
2024-12-12 18:29:37 -08:00
2024-12-13 11:16:30 -07:00
2024-12-05 15:23:37 -08:00
2024-10-30 11:16:44 -04:00
2024-12-13 14:23:02 -05:00
2024-12-12 18:27:06 -08:00
2024-11-15 07:37:31 +01:00
2024-12-12 14:58:30 -08:00
2024-12-10 11:54:26 -07:00
2024-12-05 15:06:17 -08:00
2024-12-10 15:01:14 +01:00
2024-11-22 19:02:32 -05:00
2024-12-09 14:26:36 +01:00
2024-12-12 11:17:08 -03:00
2024-12-12 01:53:00 -05:00
2024-12-02 15:01:09 -03:00
2024-12-12 11:39:35 -05:00
2024-12-13 14:23:02 -05:00
2024-12-11 16:38:03 -05:00
2024-12-13 14:23:02 -05:00
2024-12-13 14:23:02 -05:00
2024-12-13 22:31:08 +01:00
2024-12-05 15:06:17 -08:00
2024-12-06 12:06:55 -08:00
2024-12-05 15:06:17 -08:00
2024-12-12 16:39:29 +01:00
2024-12-03 18:39:00 -05:00
2024-12-13 14:23:02 -05:00
2024-12-05 15:06:17 -08:00
2024-12-11 14:05:10 -07:00
2024-11-20 16:52:38 -08:00
2024-11-22 14:49:26 -08:00
2024-11-22 10:10:01 -05:00
2024-12-09 14:26:36 +01:00
2024-12-13 14:23:02 -05:00
2024-12-13 14:23:02 -05:00
2024-11-11 18:39:05 +01:00
2024-11-21 15:57:22 +01:00
2024-12-12 15:45:44 -08:00
2024-12-12 15:45:44 -08:00
2024-12-13 00:52:03 -03:00
2024-12-13 14:23:02 -05:00
2024-12-11 14:05:10 -07:00
2024-12-13 14:23:02 -05:00
2024-11-21 14:50:38 -07:00
2024-12-11 14:05:10 -07:00
2024-12-13 14:23:02 -05:00
2024-11-15 07:37:31 +01:00
2024-11-22 14:49:26 -08:00
2024-11-21 08:48:13 +01:00
2024-12-09 14:26:36 +01:00
2024-12-13 14:23:02 -05:00
2024-12-04 23:36:36 +02:00
2024-12-06 16:42:58 -07:00
2024-12-13 14:23:02 -05:00
2024-11-18 22:56:34 +01:00
2024-11-22 19:02:32 -05:00
2024-12-13 14:23:02 -05:00
2024-12-03 23:22:26 -05:00
2024-11-11 18:39:05 +01:00
2024-12-13 14:23:02 -05:00
2024-10-30 10:59:03 +01:00
2024-12-09 14:26:36 +01:00
2024-12-13 14:23:02 -05:00
2024-12-13 22:31:08 +01:00
2024-12-13 14:23:02 -05:00
2024-12-09 14:26:36 +01:00
2024-12-03 16:24:30 +01:00
2024-12-13 14:23:02 -05:00
2024-12-03 23:19:52 -07:00
2024-12-05 19:17:26 -03:00
2024-11-22 19:02:32 -05:00
2024-12-03 12:57:39 -05:00
2024-12-13 14:23:02 -05:00
2024-12-13 14:23:02 -05:00
2024-12-13 14:23:02 -05:00
2024-12-13 14:23:02 -05:00
2024-11-11 12:58:39 -05:00
2024-12-13 12:22:26 -07:00
2024-12-13 14:23:02 -05:00
2024-12-09 14:26:36 +01:00
2024-11-21 16:24:38 -05:00
2024-12-13 14:23:02 -05:00
2024-12-13 14:23:02 -05:00
2024-12-12 01:53:00 -05:00
2024-12-13 14:23:02 -05:00
2024-11-21 15:24:04 -05:00
2024-12-13 16:13:47 -05:00