Hi,
It may just be me but Find doesn't seem to work very well at the moment. (b8 btw)
I've got a reasonably large file open (about 400 lines) and if I have no text selected I can Find no problem.
If all of the text is selected (Through Select All) then Find doesn't work with either 'Entire File' or 'Selected Text'.
If a small portion of text is selected then 'Entire File' appears to work but 'Selected Text' functions the same as Entire File, i.e. it ignores the selected text boundaries.
Anyone seeing the same thing?
Thanks,
Richard
On 20. Oct 2004, at 13:42, Richard Chamberlain wrote:
If a small portion of text is selected then 'Entire File' appears to work but 'Selected Text' functions the same as Entire File, i.e. it ignores the selected text boundaries.
The “Selected Text” is the _replace_ scope, and so does not limit what to be searched (but if people would find this useful, it could be changed, personally though, I think it'd be more trouble than good).
With regard to not finding anything, when you select all. This is because currently TextMate actually searches from the end of the current selection, to (if wrap around is enabled) the beginning of the selection.
The reason for this is that if you e.g. search for a single word, and that word is found, find next should not find the same word (if there is only a single instance of that word), which is why I do not search the selection (since what you just found ends up being selected).
But seeing how Sune wants replace to be smart and only replace if the selection is actually the result of a find, I could fix the above in the same go (i.e. only dismiss searching in the selection, if it stems from a previous find operation).
Kind regards Allan
Hi,
Hello,
On 20 Oct 2004, at 17:07, Allan Odgaard wrote:
On 20. Oct 2004, at 13:42, Richard Chamberlain wrote:
If a small portion of text is selected then 'Entire File' appears to work but 'Selected Text' functions the same as Entire File, i.e. it ignores the selected text boundaries.
The “Selected Text” is the _replace_ scope, and so does not limit what to be searched (but if people would find this useful, it could be changed, personally though, I think it'd be more trouble than good).
I do find being able to search selected text useful, although now I understand it I could probably work around.
With regard to not finding anything, when you select all. This is because currently TextMate actually searches from the end of the current selection, to (if wrap around is enabled) the beginning of the selection.
The reason for this is that if you e.g. search for a single word, and that word is found, find next should not find the same word (if there is only a single instance of that word), which is why I do not search the selection (since what you just found ends up being selected).
I think that needs changing. Could you not just record the position of the last find and not repeat it?
The current behaviour is that if you have all the text selected then Find fails to do anything even though it looks like it should.
Thanks for the reply,
Richard
On 20. Oct 2004, at 22:30, Richard Chamberlain wrote:
The reason for this is that if you e.g. search for a single word, and that word is found, find next should not find the same word (if there is only a single instance of that word), which is why I do not search the selection (since what you just found ends up being selected).
I think that needs changing. Could you not just record the position of the last find and not repeat it?
There's actually also the case where e.g. I press cmd-e, cmd-g to find the next occurrence of the selected text, here I do want it to beep, if there is no other instance (instead of finding the current selection).
But I'll figure out something! :)
Kind regards Allan
On 21 Oct 2004, at 13:28, Allan Odgaard wrote:
On 20. Oct 2004, at 22:30, Richard Chamberlain wrote:
The reason for this is that if you e.g. search for a single word, and that word is found, find next should not find the same word (if there is only a single instance of that word), which is why I do not search the selection (since what you just found ends up being selected).
I think that needs changing. Could you not just record the position of the last find and not repeat it?
There's actually also the case where e.g. I press cmd-e, cmd-g to find the next occurrence of the selected text, here I do want it to beep, if there is no other instance (instead of finding the current selection).
But I'll figure out something! :)
Cool. Thanks,
Richard