Change `go to line` keybind in editor(1) from ^I to ^G

Since this is a console program, ctrl + letter gets mapped to a
control character in the range 1 to 26. Most of these control
characters are no longer in use and can safely be assumed to be
result of ctrl + letter, but ^I maps to the tab character.

I chose ^G since the keybind is memorable, and a user is unlikely
to try to type the BEL character.
This commit is contained in:
Juhani Krekelä 2021-04-27 20:40:14 +00:00 committed by Jonas 'Sortie' Termansen
parent 86fa692c74
commit 5e666dce8a
2 changed files with 2 additions and 2 deletions

View File

@ -830,7 +830,7 @@ void editor_type_character(struct editor* editor, wchar_t c)
switch ( towlower(c) )
{
case L'c': editor_type_copy(editor); break;
case L'i': editor_type_goto_line(editor); break;
case L'g': editor_type_goto_line(editor); break;
case L'k': editor_type_cut(editor); break;
case L'o': editor->shift ?
editor_type_open_as(editor) :

View File

@ -26,7 +26,7 @@ It supports these keyboard shortcuts:
.Bl -tag -width "12345768"
.It Sy Ctrl-C
Copy.
.It Sy Ctrl-I
.It Sy Ctrl-G
Go to line.
.It Sy Ctrl-K
Cut.