From cf581afba23c239520a53bc4036a0b0a2c44b7eb Mon Sep 17 00:00:00 2001 From: night0721 Date: Thu, 4 Jul 2024 17:13:19 +0100 Subject: [PATCH] 0 and $ in vim --- src/io.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/io.c b/src/io.c index d842ccb..ef64234 100644 --- a/src/io.c +++ b/src/io.c @@ -230,6 +230,18 @@ void process_key() break; } + case '0': /* PASSTHROUGH */ + if (vip.mode == NORMAL) { + vip.cx = 0; + break; + } + + case '$': /* PASSTHROUGH */ + if (vip.mode == NORMAL) { + vip.cx = vip.row[vip.cy].size; + break; + } + default: if (vip.mode == INSERT) { insert_char(c);