Git Product home page Git Product logo

Comments (21)

utoddl avatar utoddl commented on August 22, 2024 2

There are too many config options/flags already, and adding new commands is a very large hammer for such a small (thumb)nail. But I think your original idea is correct -- that it should be as easy to do a RepeatLastFind or RepeatLastReplace as it is to do a RepeatLast. RepeatLast is certainly useful, but it is also quirky enough to constitute a barrier-to-entry for new users.

After having thought about it a while, I think the right answer is to add an optional parameter to RepeatLast, which would be [F|Find|R|Replace]. The default action would be as it is now -- whichever was done most recently -- but you could map a key to "RepeatLast Find" to get the behaviour you expect. I'll take a look to be sure, but this should take a minimal amount of code, doesn't break existing behaviour, and fills a reasonable expectation. (Also, not easily done with macros; I tried. Ugh.)

from ne.

pepa65 avatar pepa65 commented on August 22, 2024 1

By the way, very excited about the coming release!!

from ne.

utoddl avatar utoddl commented on August 22, 2024 1

Which branch did you pull from? I think we have recently committed some bad code somewhere, and we're trying to sort things out right now. So sorry.

from ne.

vigna avatar vigna commented on August 22, 2024 1

Sorry guys this must be me. I'm doing experiments in the master branch, which is of course criminal...

from ne.

vigna avatar vigna commented on August 22, 2024

I see, but there's a logic: CTRL-G is "Repeat Last". If you search and replaced a single item, but you want to replace some more, just hit CTRL-G. I think in fact people is quite used to that by now...

from ne.

pepa65 avatar pepa65 commented on August 22, 2024

But when you enter replace, you enter into a whole different level of UI. When you exit that, it is strange (and destructive!) to have Ctrl-G to do a replace outside of the replace UI.

Maybe could you add a Find Last command?? Then I'll change my Ctrl-G locally. :-)

from ne.

pepa65 avatar pepa65 commented on August 22, 2024

Would you prefer if I open a new Issue on the request for a Find Last command??

from ne.

utoddl avatar utoddl commented on August 22, 2024

If you've been doing Replace, and you want go back to doing Find, why not just do "^F<Enter>"? The Find prompt defaults to the prior Find string. There's some value in keeping the number of commands in the "find and replace" suite small. The bar for adding new commands needs to be pretty high, and I'm not sure that FindLast would meet that test when Find basically does it already.

from ne.

pepa65 avatar pepa65 commented on August 22, 2024

I don't like for a replace to happen when I want to repeat a find. Maybe I can just redefine Ctrl-G as Ctrl-F ?

If you want to keep the number of commands small, I think a Repeat Last Find would be more useful than a Repeat Last Find/Replace.

Or, can I request a configuration option to change Repeat Last to not include Replace??

from ne.

pepa65 avatar pepa65 commented on August 22, 2024

Thank you for your thoughtful consideration! I will surely use this a lot.

from ne.

utoddl avatar utoddl commented on August 22, 2024

@pepa65 There is now a "repeatlast" branch. Please check it out and see what you think.

from ne.

pepa65 avatar pepa65 commented on August 22, 2024

Super! Just works (tm)..! Thanks a lot.

from ne.

pepa65 avatar pepa65 commented on August 22, 2024

Thank you for your thoughtful consideration! I will surely use this a lot.

from ne.

pepa65 avatar pepa65 commented on August 22, 2024

I don't know what's wrong with my system suddenly, no matter which branch or version I build, I can make it segfault by editing an existing file, and then: Enter Up 's'

from ne.

pepa65 avatar pepa65 commented on August 22, 2024

Any branch -- at least I my (file?)system is not getting hosed (or I going crazy or incompetent...)!
I'll wait until the dust clears.

from ne.

pepa65 avatar pepa65 commented on August 22, 2024

Does the master branch not segfault at your end??
ne README.md then Enter Up Space

from ne.

utoddl avatar utoddl commented on August 22, 2024

No, it doesn't. Make sure you're starting from a really clean tree. There were some changes in cc options that might be hurting you if you have leftover .o files, which a git checkout wouldn't fix:

make clean
cd doc && make clean
cd ../src && make clean
cd ..```

from ne.

pepa65 avatar pepa65 commented on August 22, 2024

That didn't do the trick... Now I've done cd ..; rm -rf ne; git clone https://github.com/vigna/ne; cd ne; make build; sudo make install; src/ne README.md and then get a segfault after Enter Up Space.

from ne.

vigna avatar vigna commented on August 22, 2024

Fixed!

from ne.

pepa65 avatar pepa65 commented on August 22, 2024

Master branch is good here now. The repeatlast branch still segfaults the same way.

from ne.

pepa65 avatar pepa65 commented on August 22, 2024

The repeatlast branch is now also working!

from ne.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.