Commit Graph
64 Commits
Author SHA1 Message Date
Keith Simmons f6fe8523a0 Merge pull request #1311 from zed-industries/fix-visual-paste
Fix visual paste
2022-07-08 16:54:10 -07:00
Keith Simmons 368cfcaf3c fix pasting at the end of the line in normal mode 2022-07-08 10:57:02 -07:00
Mikayla Maki 37687c5c97 Hoisted assert clipboard into TestAppContext 2022-07-07 14:55:25 -07:00
Keith Simmons 590ab282a5 WIP making paste better 2022-07-05 16:52:56 -07:00
Keith Simmons dd4df050e5 remove partial edit from normal.rs 2022-07-05 16:48:12 -07:00
Keith Simmons cc567846e3 fix error with reverse range marked text ranges 2022-07-05 16:44:45 -07:00
Keith Simmons 570d69ee5a Highlight matching bracket when newest selection head is on a bracket 2022-07-01 15:06:16 -07:00
Keith Simmons 49d1b87d94 Fix vim editor focus selection issues, cancel vim operators on escape and unbound keys 2022-06-30 12:36:02 -07:00
Keith Simmons ee3daac057 Update command palette filter from vim mode more proactively 2022-06-29 11:58:12 -07:00
Keith Simmons 320cb7d94d Add command palette filter global and update it when vim mode is enabled/disabled 2022-06-28 13:35:43 -07:00
Max Brunsfeld 01aca3b128 Add tests and fix bugs for editor indent/outdent commands w/ hard tabs 2022-06-09 10:26:09 -07:00
Max Brunsfeld 77e036be6e Merge pull request #1109 from zed-industries/fix-vim-clearing-selections
Avoid collapsing selections on editor creation when vim_mode is disabled
2022-06-06 10:32:12 -07:00
Antonio Scandurra 77224e023a Require that PartialEq is implemented for Action 2022-06-06 09:18:44 +02:00
Antonio Scandurra 7b94a3a4bf Don't manipulate selections when syncing options if vim-mode is disabled
Previously, we were always mutating selections when `sync_editor_options`
was called. This seems to happen every time vim is enabled/disabled, but also
when vim is disabled and editors are simply focused/blurred.

This commit changes it so that we only manipulate selections when vim-mode is active.
2022-06-06 08:14:49 +02:00
Max Brunsfeld 3a1e7d91f1 vim: Avoid collapsing selections on editor creation when vim_mode is disabled 2022-06-04 15:01:43 -07:00
Antonio Scandurra 025f9af73b Cap MessageStream buffer size to 1MB
We temporarily let it grow when the message size exceed the limit,
but restore the buffer's capacity shortly after. This ensures that,
for each connection in its entire lifetime, we only ever use 1MB.
2022-05-31 11:16:32 +02:00
Max BrunsfeldandKeith Simmons f7a49efb59 Avoid switching to visual mode when following in vim mode
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-05-26 17:02:05 -07:00
Keith Simmons 2d611cb251 Fixup paste locations 2022-05-26 17:02:05 -07:00
Keith Simmons f39925f024 WIP 2022-05-26 17:02:05 -07:00
Keith Simmons b0c5ac1f54 Unify visual line_mode and non line_mode operators 2022-05-26 17:02:05 -07:00
Keith Simmons 6bec27bd79 in progress working on aborting operators on unhandled editor input 2022-05-26 17:02:05 -07:00
Keith Simmons f053c479e9 Visual line mode handles soft wraps 2022-05-26 17:02:05 -07:00
Keith Simmons b216c470cb Add visual line mode operator tests 2022-05-26 17:02:05 -07:00
Keith Simmons 36fa835664 Enable copy and paste in vim mode 2022-05-26 17:02:05 -07:00
Keith Simmons bdfa7200b9 WIP copy on delete 2022-05-26 17:02:05 -07:00
Keith Simmons a66cc7c40b Working change and delete in line mode 2022-05-26 17:02:05 -07:00
Keith Simmons be8bfa9592 WIP line mode operations 2022-05-26 17:02:05 -07:00
Max Brunsfeld e6011794ca Remove AppState from workspace actions
This allows those actions to be bound to keystrokes in the keymap.
Also, remove the WorkspaceParams struct, simplify how Workspaces are
constructed.
2022-05-19 14:37:26 -07:00
Keith Simmons 9bb347b513 Review fixes 2022-05-13 15:55:27 -07:00
Keith Simmons 07ccf7c74b minor tweaks to selections collection api 2022-05-13 15:55:27 -07:00
Keith Simmons 2a984285a2 store buffer and display_map model handles on selections collection 2022-05-13 15:55:27 -07:00
Keith Simmons 851e04d46b Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections 2022-05-13 15:55:27 -07:00
Keith Simmons 9b46bb0ee6 Move selection helpers to SelectionCollection, add update_anchor_selections, add a number of invariant preserving mutation functions to the MutableSelectionCollection 2022-05-13 15:55:17 -07:00
Keith Simmons 81c44f9733 Merge pull request #968 from zed-industries/vim-visual-mode
Vim visual mode
2022-05-10 12:51:58 -07:00
Keith Simmons b4402fa377 Fix up assertion errors in set_eq and visual tests 2022-05-10 11:12:34 -07:00
Keith Simmons cdbad9aee4 Initial visual mode 2022-05-10 11:12:28 -07:00
Antonio ScandurraandNathan Sobo 4729ab818d When opening items via project panel, only focus them on double-click
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-05 15:27:27 +02:00
Keith Simmons f0d2decb80 Don't reset vim mode on editor focus 2022-05-02 11:49:10 -07:00
Keith Simmons 660e3e9ef2 Add insert line above and below 2022-05-02 11:49:10 -07:00
Keith Simmons b011dbee8c WIP just missing insert line above and below 2022-05-02 11:49:10 -07:00
Keith Simmons c630ce81bb tweak editor selection mutating functions 2022-04-28 13:46:06 -07:00
Keith Simmons 8e7fcb3b05 Add inclusive vs exclusive motions to vim mode 2022-04-21 16:50:23 -07:00
Max Brunsfeld 4a2c73a556 Allow comments in setting and keymap JSON files 2022-04-21 11:58:18 -07:00
Keith Simmons 6196733e01 Handle linewise motions correctly and fix panic when executing invalid actions 2022-04-19 11:36:44 -07:00
Keith Simmons 6727a370c1 Revert d/c j and k binding special casing 2022-04-18 14:44:11 -07:00
Keith Simmons 35557b222c Add c and d operators to vim normal mode
Extracted motions from normal mode
Changed vim_submode to be vim_operator to enable better composition of operators
2022-04-15 16:05:50 -07:00
Max BrunsfeldandKeith Simmons 6693b3ed13 Use the word 'keymap' more consistently
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-11 17:02:16 -07:00
Max BrunsfeldandKeith Simmons 3787b3b5be Watch ~/.zed/bindings.json file for custom key bindings
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-11 16:50:44 -07:00
Max Brunsfeld a4e5dafea4 Merge branch 'main' into load-keymaps 2022-04-11 15:55:10 -07:00
Max BrunsfeldandKeith Simmons f75211df7d Move assets to their own crate, load keymaps in vim tests
Also, move assets folder to the top-level.

Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-11 15:54:52 -07:00