Comments (21)
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.
By the way, very excited about the coming release!!
from ne.
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.
Sorry guys this must be me. I'm doing experiments in the master branch, which is of course criminal...
from ne.
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.
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.
Would you prefer if I open a new Issue on the request for a Find Last command??
from ne.
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.
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.
Thank you for your thoughtful consideration! I will surely use this a lot.
from ne.
@pepa65 There is now a "repeatlast" branch. Please check it out and see what you think.
from ne.
Super! Just works (tm)..! Thanks a lot.
from ne.
Thank you for your thoughtful consideration! I will surely use this a lot.
from ne.
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.
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.
Does the master branch not segfault at your end??
ne README.md
then Enter Up Space
from ne.
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.
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.
Fixed!
from ne.
Master branch is good here now. The repeatlast branch still segfaults the same way.
from ne.
The repeatlast branch is now also working!
from ne.
Related Issues (20)
- Feature Request: Bracketed Paste Mode HOT 13
- [Question] Contribution Guidelines
- [Bug Report] Configured Coding Languages are not Highlighted HOT 2
- [Feature Request] copy current line HOT 3
- Avoid FTBFS when using binutils-gold HOT 1
- build fails in archlinux HOT 8
- copy-paste doesn't work well HOT 1
- yaml syntax highlighting of single-quoted strings incorrect HOT 2
- curses.h HOT 2
- Suggestion: preserve cur_buffer->find_string when playing a macro HOT 2
- compile ne for RiskV64 HOT 3
- Memory leak after opening file from file browser HOT 4
- [Feature Request] Soft wrapping Flag. HOT 1
- Single ESC breaks ne HOT 10
- Table of contents at the end? HOT 5
- [Feature Request] a way to move cursor to end of paste HOT 6
- "0x" prefix "tolerated" in ~/.ne/.keys file HOT 5
- autocomplete (or tab complete) macro names?
- truncation warning HOT 1
- Empty initializer list HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ne.