Conversation
Owner
Author
Owner
Author
f as chimera of clever-f and vim-seek.
Contributor
|
Just my thoughts: |
This is to de-effect reuse-f-as-repeat-find on `escape`.
Owner
Author
[FINAL STATUS]: This is excerpt from CHANGELOG
Here is test spec for tunable-fClearer than explain in words. describe "vmp unique feature of `f` family", ->
describe "ignoreCaseForFind", ->
beforeEach ->
settings.set("ignoreCaseForFind", true)
it "ignore case to find", ->
set textC: "| A ab a Ab a"
ensure "f a", textC: " |A ab a Ab a"
ensure ";", textC: " A |ab a Ab a"
ensure ";", textC: " A ab |a Ab a"
ensure ";", textC: " A ab a |Ab a"
describe "useSmartcaseForFind", ->
beforeEach ->
settings.set("useSmartcaseForFind", true)
it "ignore case when input is lower char", ->
set textC: "| A ab a Ab a"
ensure "f a", textC: " |A ab a Ab a"
ensure ";", textC: " A |ab a Ab a"
ensure ";", textC: " A ab |a Ab a"
ensure ";", textC: " A ab a |Ab a"
it "find case-sensitively when input is lager char", ->
set textC: "| A ab a Ab a"
ensure "f A", textC: " |A ab a Ab a"
ensure "f A", textC: " A ab a |Ab a"
ensure ",", textC: " |A ab a Ab a"
ensure ";", textC: " A ab a |Ab a"
describe "reuseFindForRepeatFind", ->
beforeEach ->
settings.set("reuseFindForRepeatFind", true)
it "can reuse f and t as ;, F and T as ',' respectively", ->
set textC: "| A ab a Ab a"
ensure "f a", textC: " A |ab a Ab a"
ensure "f", textC: " A ab |a Ab a"
ensure "f", textC: " A ab a Ab |a"
ensure "F", textC: " A ab |a Ab a"
ensure "F", textC: " A |ab a Ab a"
ensure "t", textC: " A ab | a Ab a"
ensure "t", textC: " A ab a Ab | a"
ensure "T", textC: " A ab a| Ab a"
ensure "T", textC: " A a|b a Ab a"
describe "findByTwoChars", ->
beforeEach ->
settings.set("findByTwoChars", true)
describe "can find one or two char", ->
it "can find by two char", ->
set textC: "| a ab a cd a"
ensure "f a b", textC: " a |ab a cd a"
ensure "f c d", textC: " a ab a |cd a"
it "can find by one-char by confirming explicitly", ->
set textC: "| a ab a cd a"
ensure "f a enter", textC: " |a ab a cd a"
ensure "f c enter", textC: " a ab a |cd a"
describe "autoConfirmTimeout", ->
beforeEach -> settings.set("findByTwoCharsAutoConfirmTimeout", 500)
it "auto-confirm single-char input on timeout", ->
set textC: "| a ab a cd a"
ensure "f a", textC: "| a ab a cd a"
advanceClock(500)
ensure textC: " |a ab a cd a"
ensure "f c d", textC: " a ab a |cd a"
ensure "f a", textC: " a ab a |cd a"
advanceClock(500)
ensure textC: " a ab a cd |a"
ensure "F b", textC: " a ab a cd |a"
advanceClock(500)
ensure textC: " a a|b a cd a"
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


#851
#366 is Previous attempt to improve
f,F, but removed because I didn't use it.Now I also want re-evaluate #366.
TODO
Allow[CHANGED MIND]fto find next line's charrepeat-findon sequentialf.fone-char(auto confirm by timeout),two-char.Provide timeout for smart-cased situation?(to use longer timeout when shift- modifier involved)Note for experiment I did
I stopped optimistically going "let's introduce clever-f int vmp" mood.
Instead, I'm now experimenting several ideas to find best/better
f.Treat 2nd char as
repeat-findachar,f a fallow 2ndasince 2ndfwork asrepeat-find.repeat-find.f a ato move 2nda, since 2ndawork asrepeat-find,f b bto 2ndband so on.repeat-find.Two char input to reduce possible matches(like vim-seek, vim-sneak).
f a bmove cursor toab, nextbwithin timeout move cursor to 2ndabain(a)andais enough, but require two char force me to typea).[current status] lazy-find
lazy-find.fby TWO like vim-seek, vim-sneakfby ONE-char by auto confirming on timeout(configurable)f,Fto repeat-find like clever-f.d f a, pre-determine text deleted by next..