2 Replies Last post: Jun 6, 2014 1:00 PM by Andriy Bazanov  
mstdmstd mstdmstd Newbie 42 posts since
May 5, 2013
Currently Being Moderated

Jun 6, 2014 8:59 AM

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 !

Maxim Kolmakov JetBrains 33 posts since
Oct 15, 2012
Currently Being Moderated
Jun 6, 2014 12:54 PM in response to: mstdmstd mstdmstd
Re: Select and copy code between brackets

Hi,

 

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

Andriy Bazanov Master 4,050 posts since
May 28, 2010
Currently Being Moderated
Jun 6, 2014 1:00 PM in response to: mstdmstd mstdmstd
Re: Select and copy code between brackets

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?

More Like This

  • Retrieving data ...