From 5c97efacb9050159aed83902184dc9c9272c4a56 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 31 May 2024 12:38:28 +1000 Subject: Add v< and v> to scroll cursor to the leftmost/rightmost column --- src/normal.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/normal.cc') diff --git a/src/normal.cc b/src/normal.cc index 4ea202ae..128a7193 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -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(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"}, -- cgit v1.2.3