1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-10-05 17:18:00 +03:00

Add v< and v> to scroll cursor to the leftmost/rightmost column

This commit is contained in:
Maxime Coste 2024-05-31 12:38:28 +10:00
parent e6a70e621d
commit 5c97efacb9
2 changed files with 15 additions and 0 deletions

View File

@ -479,6 +479,12 @@ Searches use the */* register by default (See <<registers#,`:doc registers`>>)
*b*:::
scroll to put the main selection on the bottom line of the window
*<*:::
scroll to put the main cursor on the leftmost column of the window
*>*:::
scroll to put the main cursor on the rightmost column of the window
*h*:::
scroll the window `count` columns left

View File

@ -399,6 +399,13 @@ void view_commands(Context& context, NormalParams params)
case 'b':
window.display_line_at(cursor.line, window.dimensions().line-1);
break;
case '<':
window.display_column_at(context.buffer()[cursor.line].column_count_to(cursor.column), 0);
break;
case '>':
window.display_column_at(context.buffer()[cursor.line].column_count_to(cursor.column),
window.dimensions().column-1);
break;
case 'h':
window.scroll(-std::max<ColumnCount>(1, count));
break;
@ -420,6 +427,8 @@ void view_commands(Context& context, NormalParams params)
{{'m'}, "center cursor (horizontally)"},
{{'t'}, "cursor on top"},
{{'b'}, "cursor on bottom"},
{{'<'}, "cursor on left"},
{{'>'}, "cursor on right"},
{{'h'}, "scroll left"},
{{'j'}, "scroll down"},
{{'k'}, "scroll up"},