telescope.nvim
telescope.nvim copied to clipboard
Do not affect repeat (dot command) while typing in prompt
Description
Repeat (dot command) is overwritten with what is typed in telescope prompt
Expected Behavior Repeat (dot command) should not be changed by typing in telescope prompt
Actual Behavior After typing in telescope prompt and using repeat(dot command) after telescope is closed it inserts what typed in the telescope prompt.
Details
Steps to reproduce:
- Open any file and make a change with
ciwcommand; - Open Telescope's git_files, type "asdf", exit Telescope;
- Call repeat(dot command) and see that "asdf" is inserted;
I've briefly (maybe not exhaustively enough?) looked into this and as I understand it this would currently require sizable workarounds/hacks I think are outside the scope of telescope as this refers more to (Neo)vim working as intended.
For instance, see this SO post or vim-repeat.
Therefore, I'd say this is more of an upstream issue rather than a telescope bug. Thoughts?
Thanks for checking this out! And thanks for the Telescope! It's awesome!
I've briefly (maybe not exhaustively enough?) looked into this and as I understand it this would currently require sizable workarounds/hacks I think are outside the scope of telescope as this refers more to (Neo)vim working as intended.
I understand that Telescope is using a nvim buffer for its floating window (prompt, etc.). From nvim's view, it's just another buffer and all user editing commands issued there are processed as if they were issued in a regular buffer. I was wondering if there is any way of letting nvim know that user text input in the Telescope prompt should be treated differently, i.e. "ignored" from the perspective of nvim's command history, etc. I believe a user does not want Telescope to "pollute" their command history when they switch to another file/buffer to repeat their last editing command. If this requires sizable hacks, then we should look for another way of course.
For instance, see this SO post or vim-repeat.
I see that manipulating a command history is a complex issue that should be avoided. But I rather see a solution for this issue to be "don't touch command history while in Telescope" rather than trying to amend it. Or do you mean vim-repeat could help here somehow?
No, it was more a reference of how these sorts of things are done which is quite similar to the SO post as I understand the vimscript.
But I rather see a solution for this issue to be "don't touch command history while in Telescope" rather than trying to amend it.
The references were intended to showcase to what lengths you'd have to go to to make this work in the current (Neo-)vim state of things.
I was wondering if there is any way of letting nvim know that user text input in the Telescope prompt should be treated differently, i.e. "ignored" from the perspective of nvim's command history, etc.
In brief, I don't think there is.
Got it. Thank you!
Is there another related ticket that's still open? I am interested in following this issue.
3 years gone! Do we have a better solution for this issue now? It is experience-breaking to intervene users' edit history.
Thanks!
3 years gone!
feel free to contribute.
I agree that this is an issue and should be addressed at some point, so ill reopen, but comments like yours @tamlok are disrespectful, its still a free software, no one charges you and no one forces you (i hope) to use this software.
3 years gone!
feel free to contribute.
I agree that this is an issue and should be addressed at some point, so ill reopen, but comments like yours @tamlok are disrespectful, its still a free software, no one charges you and no one forces you (i hope) to use this software.
I don't think my comment is disrespectful. Just curious what is current status of this issue. I said Thanks at the end to express my gratitude to the project. I never say that I have been charged or forced to use Telescope. "3 years gone!" is just like "Time flies" something and it is not a PUSH or blaming.
Anyway, you are the boss here! So I will pay attention to my activities at this project in the future! Enjoy! Feel free to close this issue and sorry for the comment.
please do not close this issue