Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy LIne in qt shortcut

I have been searching a lot on this but of no use. Is there any shortcut to copy an entire line with a keyboard shortcut in QT creator? I have seen shortcut for cutting a line but that's not what i want..

like image 642
nikhil Avatar asked Sep 23 '11 20:09

nikhil


People also ask

What is the shortcut for copy a line?

Select the text you want to copy and press Ctrl+C. Place your cursor where you want to paste the copied text and press Ctrl+V.

How do I copy only a line?

Ctrl-C works by itself to copy the entire line.

How do I select and copy one line?

To select a line of text, place your cursor at the start of the line, and press Shift + down arrow. To select a paragraph, place your cursor at the start of the paragraph, and press Ctrl + Shift + down arrow.

What is the shortcut for copy a line in Python?

As a workaround you may want to use some kind of Shift+Home / Shift+End for line selection and usual copy-cut-paste hotkeys after it.


2 Answers

The shortcut list is user configurable in Tools menu -> Options -> Environment -> Keyboard.

And the default shortcut to copy a line is Ctrl + Ins.

like image 139
alexisdm Avatar answered Sep 22 '22 19:09

alexisdm


Set cursor to the line you want copy and press Command+Alt+Down or Command+Alt+Up That's it!

You can also move a line: Mark the line you want to move and press Command+Shift+Down or Command+Shift+Up

Cheers!

ps: clearly they are shortcuts for mac!

pps: see also https://wiki.qt.io/Qt_Creator_Keyboard_Shortcuts

like image 23
peter70 Avatar answered Sep 23 '22 19:09

peter70