From d12564cc5e2b145f7c6d4122b98dbe2ac9ea620e Mon Sep 17 00:00:00 2001 From: Alexey Yerin Date: Tue, 27 Apr 2021 19:23:26 +0300 Subject: editor: Ctrl+{Right,Left} moves cursor by words A very useful readline feature when combined with ^W can be a really quick way to reformat a sentence, which is what I do on IRC quite often. --- ui/ui.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ui/ui.go') diff --git a/ui/ui.go b/ui/ui.go index 9ab9024..86608d1 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -176,10 +176,18 @@ func (ui *UI) InputRight() { ui.e.Right() } +func (ui *UI) InputRightWord() { + ui.e.RightWord() +} + func (ui *UI) InputLeft() { ui.e.Left() } +func (ui *UI) InputLeftWord() { + ui.e.LeftWord() +} + func (ui *UI) InputHome() { ui.e.Home() } -- cgit v1.2.3