Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #7312 > unrolled thread

Developer IDE search/replace extensions

Started by"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
First post2017-01-17 12:46 -0800
Last post2017-01-18 00:10 +0000
Articles 5 — 3 participants

Back to article view | Back to comp.programming


Contents

  Developer IDE search/replace extensions "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-01-17 12:46 -0800
    Re: Developer IDE search/replace extensions "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-01-17 12:52 -0800
      Re: Developer IDE search/replace extensions Ed Prochak <edprochak@gmail.com> - 2017-01-19 10:21 -0800
        Re: Developer IDE search/replace extensions "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-01-19 11:51 -0800
    Re: Developer IDE search/replace extensions Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-18 00:10 +0000

#7312 — Developer IDE search/replace extensions

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2017-01-17 12:46 -0800
SubjectDeveloper IDE search/replace extensions
Message-ID<865500e8-bff0-4387-9f04-d28457f7a68a@googlegroups.com>
I wanted to get some feedback from developers.  I'm creating a text
editor/IDE with search/replace functionality.  I want to be able to
do things like this:

    Source code contains this function:  iSomething_otherPart()

Without getting into refactoring abilities, just as a raw text-replace
feature, to search for the pattern "i*_*" and replace it with a form
which results in this output:

    iOtherPart()

It has taken "iSomething_o" and replaced it with "iO".

How would you like to see that being done in an IDE if you were not
tied to current limitations or regex expression syntaxes?

Thank you,
Rick C. Hodgin

[toc] | [next] | [standalone]


#7313

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2017-01-17 12:52 -0800
Message-ID<5ad595e9-df9b-49e3-864f-fc8ec58e69fd@googlegroups.com>
In reply to#7312
On Tuesday, January 17, 2017 at 3:46:46 PM UTC-5, Rick C. Hodgin wrote:
> I wanted to get some feedback from developers.  I'm creating a text
> editor/IDE with search/replace functionality.  I want to be able to
> do things like this:
> 
>     Source code contains this function:  iSomething_otherPart()
> 
> Without getting into refactoring abilities, just as a raw text-replace
> feature, to search for the pattern "i*_*" and replace it with a form
> which results in this output:
> 
>     iOtherPart()
> 
> It has taken "iSomething_o" and replaced it with "iO".
> 
> How would you like to see that being done in an IDE if you were not
> tied to current limitations or regex expression syntaxes?

My initial thinking is this to make it work in a language for developers:

    Search:   [i*_*]

The [] indicates it must be a whole word.  The pattern is searched:  it
must begin with an 'i' and have an underscore with something after.  If
found, it calls a function which allows for programmatic modification
using some simple text-based functions, such that you can examine the
full input, and operate on it programmatically testing the converted
form, and then tell it to continue on with the rest step-by-step, or in
full automatic mode if you're converting it properly as by your code.

In that way you can save your prior replacement code and reuse and share
those abilities.

What are your thoughts?

Thank you,
Rick C. Hodgin

[toc] | [prev] | [next] | [standalone]


#7328

FromEd Prochak <edprochak@gmail.com>
Date2017-01-19 10:21 -0800
Message-ID<a145baa2-b457-46a5-9e50-17d6b9c5bdc0@googlegroups.com>
In reply to#7313
HI Rick,

I am a long time VI user. So like Ben, I am fairly happy with regex.

Now maybe something with a GUI approach? Something to address Bejn's
concern? Highlight those portions of the pattern to be taken literally
and interpret the rest? that would be visually pleasing ans save on
the backslashes!

Ed

[toc] | [prev] | [next] | [standalone]


#7331

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2017-01-19 11:51 -0800
Message-ID<5789b3e2-89b3-4b8a-b2a0-384543ca5a0e@googlegroups.com>
In reply to#7328
On Thursday, January 19, 2017 at 1:21:40 PM UTC-5, Ed Prochak wrote:
> HI Rick,
> 
> I am a long time VI user. So like Ben, I am fairly happy with regex.
> 
> Now maybe something with a GUI approach? Something to address Bejn's
> concern? Highlight those portions of the pattern to be taken literally
> and interpret the rest? that would be visually pleasing ans save on
> the backslashes!

I like the idea of highlighting.

Thank you,
Rick C. Hodgin

[toc] | [prev] | [next] | [standalone]


#7314

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2017-01-18 00:10 +0000
Message-ID<87y3y9fcsu.fsf@bsb.me.uk>
In reply to#7312
"Rick C. Hodgin" <rick.c.hodgin@gmail.com> writes:

> I wanted to get some feedback from developers.  I'm creating a text
> editor/IDE with search/replace functionality.  I want to be able to
> do things like this:
>
>     Source code contains this function:  iSomething_otherPart()
>
> Without getting into refactoring abilities, just as a raw text-replace
> feature, to search for the pattern "i*_*" and replace it with a form
> which results in this output:
>
>     iOtherPart()
>
> It has taken "iSomething_o" and replaced it with "iO".
>
> How would you like to see that being done in an IDE if you were not
> tied to current limitations or regex expression syntaxes?

I'm not unhappy with the standard regex method, but that's familiarity
rather than any sense that it's optimal.  Regexps are a sort of lingua
franca in computing (though there are annoying differences in detail) so
using that method will have other benefits.

I'd be more interested in extending things that regexps can't usually
do: for example recognising when i\w+_\w+ is a symbol and when it's in a
string.

-- 
Ben.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web