Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a keyboard shortcut to select current line in PhpStorm?

In PhpStorm there is shortcut to extend selecting ctrl + w. It there shortcut to select all current line? I looking for something that works like ctrl + l in Sublime?

like image 280
Daniel Avatar asked Sep 13 '16 11:09

Daniel


People also ask

What is the shortcut to select the current 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.

How do I select a single line in Intellij?

Simply hit ctrl+c.

Is the key you press to move the cursor to the end of the current line?

The Home key moves the cursor to the beginning of the current line of typed characters, the End key moves it to the end.


2 Answers

Such action is available ... but assigned shortcut (if any) depends on actual keymap used.

In any case:

  1. Settings/Preferences | Keymap
  2. Locate Editor Actions | Select line at Caret entry (HINT: use local search box)
  3. Assign any shortcut you wish (or use provided one, if that keymap has one)

enter image description here


P.S. If you want to select current line to copy/cut it as a next step ... then you can just use Copy or Cut straight away -- it will copy/cut current line if no selection is made (default behaviour -- can be turned off via hidden setting).

like image 108
LazyOne Avatar answered Oct 29 '22 12:10

LazyOne


Yes - go to Settings > Keymap and search for "Select line at caret". You can map it to any keyboard shortcut you like by right-clicking it and select "Add Keyboard Shortcut".

If you try to assign a keyboard shortcut which is already assigned to something else, PhpStorm will let you decide whether to continue or change your keybind.

like image 27
Joe Avatar answered Oct 29 '22 12:10

Joe