commit 85304b9c94a0e1a5b25bcb82c836b0a0a855f749
parent 6dd160ea93711cac5deb9ac18ce5e26f455c8e22
Author: Rafael Garcia <rafael.garcia.gallego@gmail.com>
Date: Sat, 11 Jun 2011 19:27:32 +0200
Swapped Ctrl-c and Ctrl-q in default bindings for a better shell-like experience. Returned Ctrl-@ to its origins, but unable to f_mark right now.
Diffstat:
2 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/config.def.h b/config.def.h
@@ -77,13 +77,13 @@ static const Key curskeys[] = { /* Don't use CONTROL or META here */
static const Key stdkeys[] = {
/* keyv, test, func, arg */
-{ CONTROL('@'), { 0, 0, 0, 0 }, f_mark, { 0 } },
+{ CONTROL('@'), { 0, 0, 0, 0 }, f_move, { .m = m_tomark } },
{ CONTROL('A'), { t_bol, 0, 0, 0 }, f_move, { .m = m_prevscr } },
{ CONTROL('A'), { 0, 0, 0, 0 }, f_move, { .m = m_bol } },
{ CONTROL('B'), { 0, 0, 0, 0 }, f_move, { .m = m_prevchar } },
-{ CONTROL('C'), { t_sel, t_rw, 0, 0 }, f_pipe, TOCLIP },
-{ CONTROL('C'), { t_rw, 0, 0, 0 }, f_delete, { .m = m_nextword } },
-{ CONTROL('C'), { 0, 0, 0, 0 }, f_select, { .m = m_nextword } },
+{ CONTROL('C'), { t_warn,t_mod,0, 0 }, f_toggle, { .i = S_Running } },
+{ CONTROL('C'), { t_mod, 0, 0, 0 }, f_toggle, { .i = S_Warned } },
+{ CONTROL('C'), { 0, 0, 0, 0 }, f_toggle, { .i = S_Running } },
{ CONTROL('D'), { t_sel, t_rw, 0, 0 }, f_pipe, TOCLIP },
{ CONTROL('D'), { t_rw, 0, 0, 0 }, f_delete, { .m = m_nextchar } },
{ CONTROL('D'), { 0, 0, 0, 0 }, f_move, { .m = m_nextchar } },
@@ -108,11 +108,10 @@ static const Key stdkeys[] = {
{ CONTROL('M'), { 0, 0, 0, 0 }, f_move, { .m = m_nextline } },
{ CONTROL('N'), { 0, 0, 0, 0 }, f_move, { .m = m_nextline } },
{ CONTROL('O'), { t_sel, 0, 0, 0 }, f_select, { .m = m_tosel } }, /* Swap fsel and fcur */
-{ CONTROL('O'), { 0, 0, 0, 0 }, f_move, { .m = m_tomark } },
{ CONTROL('P'), { 0, 0, 0, 0 }, f_move, { .m = m_prevline } },
-{ CONTROL('Q'), { t_warn,t_mod,0, 0 }, f_toggle, { .i = S_Running } },
-{ CONTROL('Q'), { t_mod, 0, 0, 0 }, f_toggle, { .i = S_Warned } },
-{ CONTROL('Q'), { 0, 0, 0, 0 }, f_toggle, { .i = S_Running } },
+{ CONTROL('Q'), { t_sel, t_rw, 0, 0 }, f_pipe, TOCLIP },
+{ CONTROL('Q'), { t_rw, 0, 0, 0 }, f_delete, { .m = m_nextword } },
+{ CONTROL('Q'), { 0, 0, 0, 0 }, f_select, { .m = m_nextword } },
{ CONTROL('R'), { t_sel, 0, 0, 0 }, f_findbw, { 0 } },
{ CONTROL('R'), { 0, 0, 0, 0 }, f_spawn, FINDBW },
{ CONTROL('S'), { t_sel, 0, 0, 0 }, f_findfw, { 0 } },
diff --git a/sandy.1 b/sandy.1
@@ -104,8 +104,7 @@ Extend selection to word, line, or full file from current.
Cancel selection, or start selecting text manually.
.TP
.B Ctrl\-o
-Move to the opposite size of the selection, usually to change it or if there is
-no selection, move to mark.
+Move to the opposite size of the selection, usually to extend it.
.SS Deleting
If any text is selected, any of these bindings deletes it and, unless Backspace
or Delete, moves it to the clipboard. Otherwise they behave as per this text.
@@ -126,19 +125,15 @@ Delete to end of line or join with next line.
.B Ctrl\-w
Delete to beginning of word or previous word.
.TP
-.B Ctrl\-c
+.B Ctrl\-q
Delete to end of word or next word.
-.SS Mark
-The mark is a single fixed position in the file that can be used as bookmark.
.TP
.BR Ctrl\-Space " or " Ctrl\-`
Set mark in current position.
-.TP
-.BR Ctrl\-o
-Go to mark unless there is a selection. Prepend with Ctrl\-g to select to mark.
+Go to mark. Prepend with Ctrl\-g to select to mark.
.SS File operations
.TP
-.BR Ctrl\-q
+.BR Ctrl\-c
Quit if the file has not been modified. Repeat to quit unconditionally.
.TP
.B Ctrl\-x