diff --git a/README.asciidoc b/README.asciidoc index 8e8762f3..d4c32374 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -139,17 +139,17 @@ Commands begining with g are used to goto certain position and or buffer: * _ga_: go to the previous (alternate) buffer * _gf_: open the file whose name is selected -Window commands ---------------- +View commands +------------- -Some commands, all begining with z permit to manipulate the current -window. +Some commands, all begining with v permit to manipulate the current +view. - * _zz_ or _zc_: center the main selection in the window - * _zt_: scroll to put the main selection on the top line of the window - * _zb_: scroll to put the main selection on the bottom line of the window - * _zj_: scroll the window count line downward - * _zk_: scroll the window count line upward + * _vv_ or _vc_: center the main selection in the window + * _vt_: scroll to put the main selection on the top line of the window + * _vb_: scroll to put the main selection on the bottom line of the window + * _vj_: scroll the window count line downward + * _vk_: scroll the window count line upward Multi Selection --------------- diff --git a/src/normal.cc b/src/normal.cc index 5cdcd539..44308dd5 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -132,7 +132,7 @@ void do_go(Context& context) }); } -void do_disp_cmd(Context& context) +void do_view_commands(Context& context) { context.input_handler().on_next_key([](const Key& key, Context& context) { if (key.modifiers != Key::Modifiers::None or not context.has_window()) @@ -141,7 +141,7 @@ void do_disp_cmd(Context& context) Window& window = context.window(); switch (tolower(key.key)) { - case 'z': + case 'v': case 'c': context.window().center_selection(); break; @@ -713,7 +713,7 @@ KeyMap keymap = { { Key::Modifiers::None, 'g' }, do_go }, { { Key::Modifiers::None, 'G' }, do_go }, - { { Key::Modifiers::None, 'z' }, do_disp_cmd }, + { { Key::Modifiers::None, 'v' }, do_view_commands }, { { Key::Modifiers::None, 'y' }, do_yank }, { { Key::Modifiers::None, 'Y' }, do_cat_yank },