2

During programming I have to often select a whole word and make delete it. I am doing this by double click in mouse, but i prefer do it by keyboard - it is possible?

Thomas
  • 97
  • 2
  • 8

2 Answers2

5

As already mentioned, removing the word to the left/right is done with ctrl+backspace and ctrl+delete.

There is also ctrl+h, which selects the word under the cursor. May also be handy if you want to delete it. But originally, ctrl+h was added as search for word under cursor (i.e., pressing ctrl+h again will jump to the next instance).

user1251007
  • 15,891
  • 14
  • 50
  • 76
dhaumann
  • 1,590
  • 13
  • 25
  • Kate shortcuts ctrl+backspace ctrl+delete remove/delete **part of the word** left/right from the cursor position within the word, not the neighbor word to the left/right *(phrase "removing the word to the left/right suggests an entire word will be removed)*. Best you update your answer to make it clear. – Claudio Nov 26 '22 at 00:12
2

I do not have a Kate IDE right now to test, but these two should work, they are kind of universal.

Ctrl+Backspace – Delete previous word
Ctrl+Delete    – Delete next word

You could also just select a word left or right from the cursor with the following short keys

Shift+Ctrl+Left or Right Arrow Keys – Select words respectively left or right from the cursor

Using the short keys in a middle of the word you will delete respectively the left or the right part of the word.

Hope this helps :)

harry
  • 268
  • 2
  • 19
  • Shift+Ctrl+Left or Right Arrow Keys works as described by you - i was thinking about selecting whole word with cursor inside before, but now I think it will even more fit my needs - can select prefix and sufix. Ctrl+Backspace and Ctrl+Delete works like selection by Shift+Ctrl+Left or Right and delete one part of word (left or right). Thanks. – Thomas Jan 14 '16 at 07:37