micro icon indicating copy to clipboard operation
micro copied to clipboard

Implementation of Quoter-Plugin

Open dase78 opened this issue 3 years ago • 8 comments

Feature request:

Could you please implement the Quoter-Plugin by default, perhaps with an option like "quoter true/false"?

This would be great, I find it a very useful plugin, it's right out of way and works exactly as you would expect it to do.

(But whenever I installed it (micro -plugin install quoter) the plugin breaks my $MICRO_CONFIG_HOME/settings.json. After installing it, whenever I want to edit the settings.json directly micro says: The file on disk has changed, reload? No answer changes anything.)

I use the actual Micro-Version, installed by downloading the .deb and then apt install directly.

Micro Version: 2.0.11 Commit hash: 225927b9 OS: Debian 11 Terminal: Lxterminal

dase78 avatar Nov 27 '22 17:11 dase78

(But whenever I installed it (micro -plugin install quoter) the plugin breaks my $MICRO_CONFIG_HOME/settings.json. After installing it, whenever I want to edit the settings.json directly micro says: The file on disk has changed, reload? No answer changes anything.)

This problem is not just with quoter but with any plugin that registers its own options. (For instance quoter registers quoter.enable option.) Actually it doesn't modify the contents of settings.json, it just needlessly rewrites it with the same contents every time.

I've created an issue for it: https://github.com/zyedidia/micro/issues/2647

dmaluka avatar Nov 29 '22 19:11 dmaluka

Thanks for the explaining, so should I just ignore it (I have removed the quoter)? It made me a little nervous to always read this...

dase78 avatar Nov 30 '22 07:11 dase78

Probably yes, it's safe to just ignore it. But it's definitely worth fixing in micro, I believe.

dmaluka avatar Nov 30 '22 08:11 dmaluka

Yes, definitely. I just cannot ignore things like this... ;)

dase78 avatar Nov 30 '22 15:11 dase78

I found a temporary solution for me, by commenting out -- config.RegisterCommonOption("quoter", "enable", true) the settings.json is not rewritten. The setting in the quoter plugin did not change anything anyways (at least in my case).

dase78 avatar Dec 06 '22 14:12 dase78

https://github.com/zyedidia/micro/pull/3009 fixes it.

dmaluka avatar Nov 03 '23 00:11 dmaluka

Great! Thanks!!

dase78 avatar Nov 03 '23 06:11 dase78

This is fixed in 2.0.14 and should be closed.

injust avatar Aug 31 '24 13:08 injust