Select current line in intellij

偶尔善良 提交于 2019-11-27 22:00:56

问题


Is there any way to select the whole line at caret in IntelliJ 15? I know you can select the current word (ctl + w), go to beginning/end of line but I can't find a current line selection feature.


回答1:


Simply hit ctrl+c.

Note that for this to select the whole line, you need to ensure that nothing is already selected; otherwise it'll work as an usual "copy" command.




回答2:


  1. move caret to line
  2. on Windows, press ctrl+shift+a . This popup appears, where you find Select Line at Caret
  3. for quick access, you can specify a shortcut in Settings



回答3:


I would like to also add the following from JetBrains website. Because, that what i was looking for here, but no one mentioned it.

1- To select text from the current caret position to the beginning/end of the current word:

Ctrl+Shift+Left, Ctrl+Shift+Right.

2- To select text from the caret position to the beginning/end of the current line:

Double-click Ctrl and press Home/End

3- To select text from the current caret position to the top/bottom of the screen:

Ctrl+Shift+Page Up, Ctrl+Shift+Page Down.




回答4:


If none of the above are working, I suggest using end and home keys in combination with shift allowing you to select lines quickly.




回答5:


Go to the end of the line and hit Ctrl+W. If you'll hit Ctrl+W at the beginning of the line it will select only one word.



来源:https://stackoverflow.com/questions/36572403/select-current-line-in-intellij

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!