-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eval and replaced evaluated form with result #110
Comments
I've been thinking about it for a while, but I couldn't come up with a much better solution. You say there's a delay between the evaluation complete and the replace. Does it mean that the result is printed in the status line much before the text is replaced? That's strange because as I see you execute the paste right after the result is echoed. Could you please tell me more about the rationale behind this eval_and_replace function? To be honest I don't really like the idea of combining the 'yank' and 'paste' together (or I just simply don't see the use case here). I can understand that it would be nice to have a feature that yanks the evaluation result into the register of choice, and the use may do whatever he/she wants to do with it later or (e.g. also pasting it over the original form). So I could more imagine and eval_and_yank feature instead of eval_and_replace. What do you think? Oh, and sorry for the late answer, I was quite busy this week. |
Don't worry. Thanks for the great software! I can't imagine working with lisp in vim without this amazing plugin. :D
After some digging, I found that the delay is mostly due to
(defun · (title)
`(✓ ,title)
)
(defun ✓ (title)
`(· ,title)
) So, if I type (· "buy milk") and call (✓ "buy milk") Therefore, I can quickly track todos in my lisp session and keeps a list of current state in the source code.
|
For example, I have a form
After evaluation, I want it to become:
3
How do I achieve it with slimv?
I have a working prototype at https://github.com/poga/slimv. It exposes two new function
SlimvEvalDefunAndReplace
andSlimvEvalDefunAndReplace
.It kinda worked. However there's some limit to it (mostly because I'm completely new to vimscript):
r
. I'm not using the register anyway but it's definitely not ideal.My question is: Is there a better way to do this? I'm willing to contribute if you're fine with this feature. Any guidance is appreciated 😄
The text was updated successfully, but these errors were encountered: