How can I clone a line in KDevelop? Is there any shortcut or menu item for that?
Asked
Active
Viewed 951 times
2 Answers
4
To duplicate lines up/down, use:
- Ctrl+Alt+Up
- Ctrl+Alt+Down
To move lines up/down, use:
- Ctrl+Shift+Up
- Ctrl+Shift+Down
See Editor->Tools->Scripts.
This is all implemented in Kate using JavaScript and can easily be extended.
To reassign the shortcuts, see Settings->Configure Shortcuts.

Drew Noakes
- 300,895
- 165
- 679
- 742

Niko Sams
- 4,304
- 3
- 25
- 44
-
Is it possible to change these key bindings? I could not find _Scripts_ under _Tools_ menu (KDevelop 4.2.3) – B Faley Oct 30 '12 at 08:32
-
Thanks very much. On my Ubuntu 12.04 install, these shortcuts are hijacked by Unity to switch virtual desktops. Reassigning them worked perfectly. – Drew Noakes Mar 30 '13 at 14:52
0
There is also the option to enable Copy/Cut the current line if no selection
in Settings
-> Editor
-> Editing
.
Then you can Ctrl+C and Ctrl+V any line.

goetz
- 2,018
- 2
- 30
- 33