tvi: ^G command - neatvi - [fork] simple vi-type editor with UTF-8 support
HTML git clone git://src.adamsgaard.dk/neatvi
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit d5fdad85ce7861cb976204da853df15ad14b5a38
DIR parent 7cbcaf73c5c8cc39c55bd675672e26faa064e97f
HTML Author: Ali Gholami Rudi <ali@rudi.ir>
Date: Wed, 13 May 2015 09:28:13 +0430
vi: ^G command
Diffstat:
M vi.c | 11 +++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)
---
DIR diff --git a/vi.c b/vi.c
t@@ -678,6 +678,14 @@ static int vi_scrollbackward(int cnt)
return 0;
}
+static void vi_status(void)
+{
+ char stat[128];
+ sprintf(stat, "[%s] %d lines, %d,%d\n",
+ xpath[0] ? xpath : "unnamed", lbuf_len(xb), xrow + 1, xcol + 1);
+ led_print(stat, xrows);
+}
+
static void vi(void)
{
int mark;
t@@ -735,6 +743,9 @@ static void vi(void)
lbuf_redo(xb);
redraw = 1;
break;
+ case TERMCTRL('g'):
+ vi_status();
+ break;
case ':':
term_pos(xrows, led_pos(":", 0));
term_kill();