Is there a [default] delete line shortcut in Ubuntu

Petter Adsen petter at nillabs.com
Sun May 17 12:49:55 UTC 2020



On Sun, May 17, 2020 at 13:42, Chris Green <cl at isbd.net> wrote:
> On Sun, May 17, 2020 at 08:17:31PM +1000, Karl Auer wrote:
>>  On Sun, 2020-05-17 at 10:56 +0100, Chris Green wrote:
>>  > Is there a keyboard short-cut for Delete Line in Ubuntu?
>> 
>>  In the terminal, CTL-K will delete from the cursor to the end of the
>>  line, "delete line" is Home then CTL-K. Good old WordStar.
>> 
>>  It differs from application to application. In gedit it's CTL-D. In 
>> vi
>>  it's "dd". In LibreOffice, use the Help and search for "Shortcut".
>> 
> If you set gtk-key-theme-name = "Emacs" in ~/.gtkrc-2.0 then CTRL/U
> works as Delete Line almost universally.  It's "Delete from cursor to
> start of line" which very often means Delete Line as the cursor is
> most often at the end anyway.  So, IMHO, it's handier than Home then
> CTRL/K.
> 
> However, Digikam seems to ignore ~/.gtkrc-2.0 though Home + CTRL/K
> does work in Digikam which is something I suppose.  There isn't a
> default Delete to Start of Line is there, that's what I want.  Where
> is CTRL/K set up?  Presumably it's configured somewhere such that most
> programs use it.
> 

If you look at 'man 3readline readline', you will see that you can bind 
a shortcut
to the operation kill-whole-line. That will work for any application 
that uses the
readline library (bash among others). You will set that binding in 
~/.inputrc.

Petter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20200517/f38b7fc1/attachment.html>


More information about the ubuntu-users mailing list