NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Default to Selected Text scope if multiline text is selected


Joined: 29 Jan 2008
Posts: 11
Reply with quote
I'd like it if when I have multiple lines selected that the find or replace dialogs would default to 'Selected Text' scope.
View user's profileFind all posts by stackSend private message
Veteran

Joined: 30 Aug 2006
Posts: 116
Reply with quote
this is a great suggestion, and is similar to some other IDE's. Works perfectly in those IDE's too.
View user's profileFind all posts by rudderSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
it works fine for me.
Did you try multiline search option in the Find dialog?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 29 Jan 2008
Posts: 11
Reply with quote
It is the scope selection that I would like defaulted differently.

Some example do-nothing-worth-doing code:
Code:

<?php
function blah($var = "one") {
  if ("one" == $var) {
    echo "It is one.";
  }
}
$bar = 'two';
echo "{$bar}";


Suppose I selected in some file that small function leaving the last two code lines unselected. With this little example I want to replace all the double quotes with single quotes only in my text I selected. If it did the replace globally it would change the result of the last unselected echo as well.

The current behavior now is to populate the 'Text to find' field with the first line of the selected text and default [Scope] to 'Global'. The behavior I'd like to see is that the [Scope] box default to 'Selected Text' in cases where I've selected multiple lines of text.

I find that after my switch from Zend Studio I'm a bit quick to [ctrl-R] [backspace] type in the text to find [tab] [backspace] type the replace text [enter]. In PHPEd I have to mouse over to set the 'Selected Text' scope each time before hitting enter or I end up doing a global text replace.

I use 'Selected Text' scope way more often than global scope for replaces so if I'd even accept an option screen switch to toggle the default scope. My finds typically are always global though.
View user's profileFind all posts by stackSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
ah, I got it now.
It was discussed there many times and the conclusion was to leave it as is, or else many other custoemers will be confused.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Default to Selected Text scope if multiline text is selected
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic