diff options
author | Ron Yorston | 2021-04-17 09:25:11 +0100 |
---|---|---|
committer | Denys Vlasenko | 2021-04-20 11:21:43 +0200 |
commit | 310ef232809b34a75c120629b7b2c0d4af0dd50f (patch) | |
tree | 93e45b99655325f87dd5614c2838ef65b7a39cb4 /libbb/mode_string.c | |
parent | d9136efd7ac5f7655376057e0ba28498a975216b (diff) | |
download | busybox-310ef232809b34a75c120629b7b2c0d4af0dd50f.zip busybox-310ef232809b34a75c120629b7b2c0d4af0dd50f.tar.gz |
vi: add expandtab option
This implements the vim option expandtab in BusyBox vi. From
vim help:
In Insert mode: Use the appropriate number of spaces to insert a
<Tab>. Spaces are used in indents with the '>' and '<' commands and
when 'autoindent' is on. To insert a real tab when 'expandtab' is
on, use CTRL-V<Tab>.
This implementation doesn't change how BusyBox vi handles autoindent:
it continues to copy the indentation from a neighbouring line. If
that line has tabs in its indentation so too will the new line.
function old new delta
char_insert 563 679 +116
next_column - 48 +48
.rodata 105211 105236 +25
colon 3844 3855 +11
refresh 1000 982 -18
move_to_col 83 59 -24
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/2 up/down: 200/-42) Total: 158 bytes
Signed-off-by: Peter D <urmum69@snopyta.org>
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/mode_string.c')
0 files changed, 0 insertions, 0 deletions