Select and copy code between brackets

In my phpStorm 7.1.3 setting cursor on open bracket I see end bracket  selected and and line at left showing code between these brackets.
Can I in this location :
1) Move to the end bracket ?
2) Copy all code  between these brackets to clipboard ?

Thanks !

2 comments

Hi,

Yes, you can do it. Please check corresponding shortcut in "Settings->Keymap". Search for "Move Caret".

0

Hi there,

Please always provide some example code as it's not always possible to clearly describe all aspects using words only.


1) What exactly do you mean by "brackets"? Different people mean different things: {}, () etc

If it's about {} -- then it's Ctrl+Shift+] (Settings | Keymap | Editor Actions | Move Caret to Code Block End with Selection)

If it's about () -- then there is no such action available -- http://youtrack.jetbrains.com/issue/IDEA-12068

But you can always try Ctrl+W (Select Word at caret)  .. or how it's called now in v8 "Edit | Extend Selection" -- may work good enough for your needs (depends on actual text/code).


2) Once you have made selection you can copy it, right? So ... did Ctrl+C (Edit | Copy) stopped working for you?

0

Please sign in to leave a comment.