move view commands to v prefix instead of z
This commit is contained in:
parent
485a50bb4b
commit
5b50b32e68
|
@ -139,17 +139,17 @@ Commands begining with g are used to goto certain position and or buffer:
|
||||||
* _ga_: go to the previous (alternate) buffer
|
* _ga_: go to the previous (alternate) buffer
|
||||||
* _gf_: open the file whose name is selected
|
* _gf_: open the file whose name is selected
|
||||||
|
|
||||||
Window commands
|
View commands
|
||||||
---------------
|
-------------
|
||||||
|
|
||||||
Some commands, all begining with z permit to manipulate the current
|
Some commands, all begining with v permit to manipulate the current
|
||||||
window.
|
view.
|
||||||
|
|
||||||
* _zz_ or _zc_: center the main selection in the window
|
* _vv_ or _vc_: center the main selection in the window
|
||||||
* _zt_: scroll to put the main selection on the top line of the window
|
* _vt_: 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
|
* _vb_: scroll to put the main selection on the bottom line of the window
|
||||||
* _zj_: scroll the window count line downward
|
* _vj_: scroll the window count line downward
|
||||||
* _zk_: scroll the window count line upward
|
* _vk_: scroll the window count line upward
|
||||||
|
|
||||||
Multi Selection
|
Multi Selection
|
||||||
---------------
|
---------------
|
||||||
|
|
|
@ -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) {
|
context.input_handler().on_next_key([](const Key& key, Context& context) {
|
||||||
if (key.modifiers != Key::Modifiers::None or not context.has_window())
|
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();
|
Window& window = context.window();
|
||||||
switch (tolower(key.key))
|
switch (tolower(key.key))
|
||||||
{
|
{
|
||||||
case 'z':
|
case 'v':
|
||||||
case 'c':
|
case 'c':
|
||||||
context.window().center_selection();
|
context.window().center_selection();
|
||||||
break;
|
break;
|
||||||
|
@ -713,7 +713,7 @@ KeyMap keymap =
|
||||||
{ { Key::Modifiers::None, 'g' }, do_go<SelectMode::Replace> },
|
{ { Key::Modifiers::None, 'g' }, do_go<SelectMode::Replace> },
|
||||||
{ { Key::Modifiers::None, 'G' }, do_go<SelectMode::Extend> },
|
{ { 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_yank },
|
||||||
{ { Key::Modifiers::None, 'Y' }, do_cat_yank },
|
{ { Key::Modifiers::None, 'Y' }, do_cat_yank },
|
||||||
|
|
Loading…
Reference in New Issue
Block a user