ZIm/crates
Vishal Bhavsar 31e9526544
vim: Add support for moving to first, middle and last visible lines (H, L, M) (#6919)
This change implements the vim
[motion](https://github.com/vim/vim/blob/master/runtime/doc/motion.txt)
commands to move the cursor to the top, middle and bottom of the visible
view. This feature is requested in
https://github.com/zed-industries/zed/issues/4941.

This change takes inspiration from
[crates/vim/src/normal/scroll.rs](https://github.com/zed-industries/zed/blob/main/crates/vim/src/normal/scroll.rs).

A note on the behavior of these commands: Because
`NeovimBackedTestContext` requires compatibility with nvim, the current
implementation causes slightly non-standard behavior: it causes the
editor to scroll a few lines. The standard behavior causes no scrolling.
It is easy enough to account for the margin by adding
`VERTICAL_SCROLL_MARGIN`. However, doing so will cause test failures due
to the disparity between nvim and zed states. Perhaps
`NeovimBackedTestContext` should have a switch to be more tolerant for
such cases.

Release Notes:

- Added support for moving to top, middle and bottom of the screen in
vim mode (`H`, `M`, and `L`)
([#4941](https://github.com/zed-industries/zed/issues/4941)).
2024-01-29 20:58:24 -07:00
..
activity_indicator Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
ai Use fallback BPE if the language model doesn't have one (#6848) 2024-01-29 22:42:03 -05:00
assets Load embedded fonts directly from .rdata instead of cloning (#6932) 2024-01-29 10:06:57 +01:00
assistant text: Wrap BufferId into a newtype 2024-01-29 20:00:47 +01:00
audio Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
auto_update update: Add arch and os to release query parameters. (#6976) 2024-01-29 10:48:54 +01:00
breadcrumbs Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
call Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
channel text: Wrap BufferId into a newtype 2024-01-29 20:00:47 +01:00
cli Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
client Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
clock Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
collab collab 0.42.1 2024-01-29 13:46:45 -08:00
collab_ui Prevent z-index id shuffle when number of z-indicies in the scene change 2024-01-29 13:08:40 -05:00
collections Remove license-file from Cargo.toml as it is apparently redundant (#4218) 2024-01-23 17:40:30 +01:00
color Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
command_palette Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
copilot text: Wrap BufferId into a newtype 2024-01-29 20:00:47 +01:00
copilot_ui Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
db Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
diagnostics Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
editor vim: Add support for moving to first, middle and last visible lines (H, L, M) (#6919) 2024-01-29 20:58:24 -07:00
feature_flags Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
feedback Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
file_finder Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
fs Introduce cross-platform file-watching (#6855) 2024-01-29 22:18:10 +02:00
fsevent fix: isolate macos-specific dependencies (#6854) 2024-01-27 13:38:55 +01:00
fuzzy Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
git text: Wrap BufferId into a newtype 2024-01-29 20:00:47 +01:00
go_to_line Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
gpui Prevent z-index id shuffle when number of z-indicies in the scene change 2024-01-29 13:08:40 -05:00
gpui_macros Remove license-file from Cargo.toml as it is apparently redundant (#4218) 2024-01-23 17:40:30 +01:00
install_cli Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
journal Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
language text: Wrap BufferId into a newtype 2024-01-29 20:00:47 +01:00
language_selector Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
language_tools Replace IIFE with maybe! (#6909) 2024-01-27 22:34:37 -05:00
live_kit_client Build media and live-kit in test-mode on non-MacOS (#6859) 2024-01-29 18:04:15 -08:00
live_kit_server Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
lsp Add missing workspace edit capabilities (#6950) 2024-01-28 23:46:10 +02:00
media Build media and live-kit in test-mode on non-MacOS (#6859) 2024-01-29 18:04:15 -08:00
menu Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
multi_buffer text: Wrap BufferId into a newtype 2024-01-29 20:00:47 +01:00
node_runtime Fix #4628: npm install to a wrong location (#6742) 2024-01-28 14:10:10 -05:00
notifications Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
outline Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
picker Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
plugin Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
plugin_macros Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
plugin_runtime Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
prettier Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
project Introduce cross-platform file-watching (#6855) 2024-01-29 22:18:10 +02:00
project_panel Add ability to expand/collapse directories using the project_panel::Open action (#6914) 2024-01-29 18:21:23 -08:00
project_symbols Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
quick_action_bar Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
recent_projects Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
refineable Remove license-file from Cargo.toml as it is apparently redundant (#4218) 2024-01-23 17:40:30 +01:00
rich_text Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
rope Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
rpc Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
search text: Wrap BufferId into a newtype 2024-01-29 20:00:47 +01:00
semantic_index Update casing of "OpenAI" in identifiers to match Rust conventions (#6940) 2024-01-28 12:01:10 -05:00
settings Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
snippet Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
sqlez Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
sqlez_macros Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
story Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
storybook Rework access to ThemeRegistry global (#7023) 2024-01-29 17:51:34 -05:00
sum_tree Remove license-file from Cargo.toml as it is apparently redundant (#4218) 2024-01-23 17:40:30 +01:00
terminal Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
terminal_view Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
text Change underlying type of BufferId to NonZeroU64. 2024-01-29 20:00:47 +01:00
theme Add support for loading user themes (#7027) 2024-01-29 21:32:45 -05:00
theme_importer Load embedded fonts directly from .rdata instead of cloning (#6932) 2024-01-29 10:06:57 +01:00
theme_selector Add support for loading user themes (#7027) 2024-01-29 21:32:45 -05:00
ui Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
util Add support for loading user themes (#7027) 2024-01-29 21:32:45 -05:00
vcs_menu Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
vim vim: Add support for moving to first, middle and last visible lines (H, L, M) (#6919) 2024-01-29 20:58:24 -07:00
welcome Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
workspace Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
zed Add support for loading user themes (#7027) 2024-01-29 21:32:45 -05:00
zed_actions Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00