Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative key combination for jumping to the end of a line to enter a semicolon

Due to automatic code completion, I regularly find myself in between parentheses, having to get to the end of a line to add the inevitable semicolon.

Then I have to get my right hand up, move it to the right, hit End, and come back to the main part of the keyboard again to enter the semicolon.

I perceive this as disturbing to my flow of typing, especially when writing on a notebook, as then those moves of my hand are very inefficient.

Is there already a key combination for reaching the end of a line, or adding a semicolon, within the main keyboard area? Or is it possible to configure PhpStorm in those regards?

(I'm using PhpStorm, but I added the IntelliJ IDEA tag to this question as I guess they would be similar regarding those basic features.)

photo of a keyboard with the letter and number keys, as well as immediately adjacent keys, highlighted

like image 827
Raffael Avatar asked Sep 26 '11 11:09

Raffael


People also ask

What is the keyboard shortcut to jump to the end of a line?

End – Move cursor to end of current line. Ctrl+Home – Move cursor to top of the text entry field. Ctrl+End – Move cursor to bottom of the text entry field.

How do you jump to the end of a line in Python?

control-E: go to end of line.

How do you get to the end of the line in programming?

It works like this: Home/End takes you to the beginning/end of a line, Ctrl+Home/End to the beginning/end of document.

What is Ctrl N?

Alternatively referred to as Control+N, ^n, and C-n, Ctrl+N is a keyboard shortcut most often used to create a new document, window, workbook, or other type of file.


3 Answers

More efficiently: invoke Edit | Complete Current Statement (Ctrl+Shift+Enter) to automatically insert semicolon at end of line and start new line.

like image 131
Alexey Gopachenko Avatar answered Oct 14 '22 05:10

Alexey Gopachenko


You can assign any keyboard shortcut to the Move Caret to Line End action in Settings | Keymap.

like image 31
CrazyCoder Avatar answered Oct 14 '22 07:10

CrazyCoder


You need to try touchcursor. I just love it.

like image 4
soalg Avatar answered Oct 14 '22 07:10

soalg