-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature request, blink on command (or key press) rerun #3226
Comments
Such blinking can be achieved by adding something like this to your init.lua:
But it will not work with micro 2.0.9. This possibility was added recently in PR #3023 and is not in any official release yet. |
@dmaluka where can I find init.lua for micro? |
You just create an empty See help tutorial and help plugins. |
@dmaluka it gives me this error:
also can you give me a similar function but for saving a file? |
As I said in #3226 (comment), this does not work with older versions of micro. You'd need to compile the newest micro from the master branch on your own.
|
Hmm, actually there are nightly builds: https://github.com/zyedidia/micro/releases/tag/nightly which are supposed to allow users to run the latest and greatest micro without the need to compile it. But, it says: "Assets uploaded on Tue Apr 9 00:01:33 UTC 2024 for commit 68d88b5." i.e. these builds are still being build nightly, but from v2.0.13, not from the newest master. @zyedidia what should we do to make them build from the newest master again? |
sorry, forgot to mention, I got the newest stable version before I replied again and it was showing that error.
thanks for the save one |
Yeah, but even 2.0.13 still doesn't include this feature. You'd need to download and compile Micro source code on your own:
(you'd also need to install Go) I'll try to figure out what's going on with nightly builds. (Please feel free to remind if I forget to.) |
if I were to make a suggestion, add an option to make the infobar clear after x seconds and x=0 or x=-1 means do not clear. |
I've just uploaded PR #3244 which would allow to implement that in a plugin. With this PR, you can add something like this to your init.lua (or to a separate plugin):
It will provide |
you know, your knowledge of lua (or is it go) is very good. is there any resource or method you suggest for me to persue to learn lua (or go) as well as you? |
I don't think my knowledge of Lua is very good. But Lua is a rather easy language to learn anyway. Probably what you want to know is not just how to write in Lua but how to write plugins for Micro. In theory, the answer is: read help plugins. In practice, that's not really enough in most cases. See, in particular, the paragraph "This may seem like a small list of available functions but ..." in help plugins. It helps a lot to know how micro is built from inside. I'd suggest digging into micro's source code (it is in Go), seeing how it implements a particular functionality that you'd like to extend in your plugin (like, in this example, the status bar messages), checking which of its internal APIs related to this functionality are accessible from Lua in one way or another, and try to use those APIs in your plugin to achieve what you need. Also you can use existing plugins as examples, of course. |
thanks for these, they are great help. |
by the way I have tested your fork #3244 @dmaluka it works fine. but clearstatus needs to be added manually to the settings.json file, it cannot be added using the set command. just leaving this info here for anyone who comes across this thread later. |
Yeah, in order to make it work with the
(Funnily, this "plugin name"
And to make it work, you'd need to replace this:
with something like this:
|
FYI nightly builds are now fixed (#3284) so you can grab the newest micro from https://github.com/zyedidia/micro/releases/tag/nightly. |
Hello again. I used micro 2.0.13 for my purposes and it seems to work fine. are you suggesting that 2.0.13 does not have the code needed for the init.lua that you made for me and that I need to use nightly? or is 2.0.13 good enough? |
If the lua code you have in init.lua uses While we're at it, if your init.lua uses |
I checked my version and it said 0.0 I probably had cloned your pull request commit code. |
Description of the problem or steps to reproduce
I am copying things a lot and would like a visual representation of a successful copy.
on first copy, it shows that a successful copy was made, but on subsequent copies, there is no visual indication that a copy was made.
to ammend this, I suggest the message at the bottom to blink or do some other visual cue.
Specifications
Commit hash: micro 2.0.9
OS: kubuntu jammy
Terminal: konsole
The text was updated successfully, but these errors were encountered: