move view commands to v prefix instead of z

This commit is contained in:
Maxime Coste 2013-04-16 13:54:04 +02:00
parent 485a50bb4b
commit 5b50b32e68
2 changed files with 12 additions and 12 deletions

View File

@ -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
---------------

View File

@ -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<SelectMode::Replace> },
{ { Key::Modifiers::None, 'G' }, do_go<SelectMode::Extend> },
{ { 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 },