nvim-next icon indicating copy to clipboard operation
nvim-next copied to clipboard

Cannot repeat builtin `f`/`F`/`t`/`T` motions

Open ghostbuster91 opened this issue 2 years ago • 6 comments

dfx followed by . doesn't work.

ghostbuster91 avatar Sep 19 '23 07:09 ghostbuster91

Here is some info about dot-repeatable actions:

  • https://gist.github.com/kylechui/a5c1258cd2d86755f97b10fc921315c3
  • https://www.vikasraj.dev/blog/vim-dot-repeat

ghostbuster91 avatar Sep 19 '23 07:09 ghostbuster91

Super gentle prod just to hear if you're planning on fixing this :sweat_smile:

I use movements like df", dt<Space> etc. quite a lot, so I keep running into this bug. If development of this plugin is frozen indefinitely then I'd rather uninstall it now and start getting used to not being able to repeat ]c... :cry:

Hubro avatar Feb 05 '24 16:02 Hubro

I personally stopped using f/t motions from this plugin because of this this. I was getting irritated with it not working as it should and I needed a quick workaround.

I don't know atm how to fix it. I would need to spend some time, take a look at some other plugins and see how they do this. I had other things on my plate recently and I did not have motivation for digging into this kind of stuff.

If development of this plugin is frozen indefinitely

No, it is not. I am using it (apart from this feature) and I cannot image working without it. At some point I will fix this issue though there is no ETA. Hopefully someone will beat me to it and submit a PR first.

I would be very happy to accept a PR with a fix ;)

ghostbuster91 avatar Feb 05 '24 18:02 ghostbuster91

same issue in treesitter-textobjects https://github.com/nvim-treesitter/nvim-treesitter-textobjects/issues/519

ghostbuster91 avatar Feb 05 '24 18:02 ghostbuster91

I went through couple of projects that seem to be doing something similar under the hood. The bad news is that it is tricky and requires some high vim-fu. The good news is that mini.jump was among them and it should be possible to implement that feature based on it.

ghostbuster91 avatar Feb 05 '24 22:02 ghostbuster91

I personally stopped using f/t motions from this plugin

Do you mean you stopped using f/t motions altogether, or is there an easy workaround I'm not seeing?

Hubro avatar Feb 07 '24 07:02 Hubro

Awesome! :tada:

I rewrote all my stuff to use require("nvim-treesitter.textobjects.repeatable_move").make_repeatable_move_pair a while ago, but it feels really weird to use nvim-treesitter.textobjects to repeat git chunk moves, document diagnostic moves etc. I would definitely prefer to use a separate plugin for that.

Will try out nvim-next again next time I feel like refactoring a bit :smile:

Hubro avatar Aug 29 '24 13:08 Hubro