Coder Social home page Coder Social logo

"Smart" case fold? about ctrlf HOT 8 CLOSED

radian-software avatar radian-software commented on July 25, 2024
"Smart" case fold?

from ctrlf.

Comments (8)

raxod502 avatar raxod502 commented on July 25, 2024

That seems fine as an optional configuration. We can just use isearch-no-upper-case-p; it's not going anywhere.

from ctrlf.

raxod502 avatar raxod502 commented on July 25, 2024

Case folding is now guessed based on the current search query by default, and you can toggle it persistently (for the search session) using M-s c, the same binding as in Isearch.

from ctrlf.

AmaiKinono avatar AmaiKinono commented on July 25, 2024

This works well! But I don't know if the keybinding is the best. M-s calls next-matching-history-item in minibuffer by default, so I have to bind ctrlf-toggle-case-fold-search to another key to use it.

from ctrlf.

raxod502 avatar raxod502 commented on July 25, 2024

I noticed that. Any suggestions on a better binding? I was unable to find anything standard that wasn't a bad idea in one way or another.

from ctrlf.

AmaiKinono avatar AmaiKinono commented on July 25, 2024

How about M-c? That seems to do the same thing in isearch.

from ctrlf.

raxod502 avatar raxod502 commented on July 25, 2024

But as I mention in #29, that conflicts with capitalize-dwim, which to me is even worse than conflicting with next-matching-history-item as it is a better-known command.

from ctrlf.

AmaiKinono avatar AmaiKinono commented on July 25, 2024

Ah yes... I think bind M-s to nil is not a bad idea. Or if we have to invent it, I think we could have a prefix key (like C-o in ivy. I personally have M-l (means "local") in various temporary state / special major mode to execute their commands), and put c under it to toggle case fold. In the future we may have other switches, and commands like "recursive edit" during replacing, we could put those under that prefix too. Actually I think it's a good idea to also have search style switches under it.

from ctrlf.

raxod502 avatar raxod502 commented on July 25, 2024

M-l is bad because it conflicts with downcase-dwim, but C-o is a fair choice because wanting to use open-line in the middle of a search would be an odd use case. Changed.

from ctrlf.

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.