summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cmds_edit.c17
-rwxr-xr-xsrc/doc9
2 files changed, 25 insertions, 1 deletions
diff --git a/src/cmds_edit.c b/src/cmds_edit.c
index 094ddf0..5318008 100644
--- a/src/cmds_edit.c
+++ b/src/cmds_edit.c
@@ -388,6 +388,23 @@ void do_editmode(struct block * sb) {
inputline_pos = wcswidth(inputline, real_inputline_pos);
break;
+ case L'^':
+ pos = first_nonblank_char();
+ if (pos == -1) return;
+ del_range_wchars(inputline, pos, real_inputline_pos-1);
+ real_inputline_pos = pos;
+ inputline_pos = wcswidth(inputline, real_inputline_pos);
+ break;
+
+ case L'g':
+ if (ui_getch_b(&wi) == -1 || wi != L'_') return;
+ pos = last_nonblank_char();
+ if (pos == -1) return;
+ del_range_wchars(inputline, real_inputline_pos, pos);
+ real_inputline_pos = pos;
+ inputline_pos = wcswidth(inputline, real_inputline_pos);
+ break;
+
case L'e': // de or ce
del_range_wchars(inputline, real_inputline_pos, for_word(1, 0, 0));
break;
diff --git a/src/doc b/src/doc
index 5365991..97cc1b6 100755
--- a/src/doc
+++ b/src/doc
@@ -279,14 +279,19 @@ Commands for handling cell content:
de Delete until the end of the word.
dw Delete until the beginning of the next word.
+
d0 Delete until the beginning of the line.
+ d$ Delete until the end of the line.
+ d^ Delete from position until the first non blank character of the line
+ dg_ Delete from position until the last non blank character of the line
+
db If at the beginning of a word, delete until the beginning of
the previous word. Otherwise, delete until the beginning of
the word under the cursor.
daw Delete the word under the cursor.
dE Delete until the end of WORD.
dW Delete until the beginning of the next WORD.
- d$ Delete until the end of the line.
+
dB If at the beginning of a word, delete until the beginning of
previous WORD. Otherwise, delete until the beginning of the
WORD under the cursor.
@@ -309,6 +314,8 @@ Commands for handling cell content:
cE Same as "dE", then enter Insert mode.
cW Same as "dW", then enter Insert mode.
c$ Same as "d$", then enter Insert mode.
+ c^ Same as "d^", then enter Insert mode.
+ cg_ Same as "dg_", then enter Insert mode.
cB Same as "dB", then enter Insert mode.
caW Same as "daW", then enter Insert mode.
cl Same as "dl", then enter Insert mode.