filemanager-plugin
filemanager-plugin copied to clipboard
Micro v2 broke the plugin
When my cursor is over the directory that I want to make a new directory inside of and run mkdir new_dir_name
and I get this error:
Lua API error: filemanager:688: bad argument #2 to Join (cannot use &{0xc0003cdbf0 0xc0000e3680 0xc000846540 true false {13802471252486016088 281212483360 0x1caf9c0} {2 2} {0 0 <nil>} false false false false 2 0xc00065d6c0 {0 0}} (type *action.BufPane) as type string)
stack traceback:
[G]: in function 'Join'
filemanager:688: in function 'create_filedir'
filemanager:800: in main chunk
[G]: ?
Press enter to continue
Are you on the new v2 of Micro? I'm pretty sure the update broke this plugin.
Oh, I don't know. I just did brew install micro
today and have been trying it out for the first time. I'm guessing that means I'm on the latest.
Putting https://github.com/micro-editor/updated-plugins/tree/master/filemanager-plugin in your ~/.config/micro/plug/
might work as a temporary fix, but I haven't tried it.
Using the version in the updated-plugins repo does not help.
Here's the result of opening the tree and then running the command touch test.txt
.
Lua API error: filemanager:220: attempt to call a non-function object
stack traceback:
filemanager:220: in function 'dirname_and_join'
filemanager:691: in function 'create_filedir'
filemanager:794: in main chunk
[G]: ?
Press enter to continue
pull request #52 should close this issue.
I have tested on mac osx and the above is fixed. If will need testing on other operating systems, but should work.
If you want to test the updated plugin, then uninstall the old filemanager plugin.
Install with git on linux or mac osx with commands below.
mkdir ~/.config/micro/plug
git clone -b microV2 https://github.com/tommyshem/filemanager-plugin.git ~/.config/micro/plug/filemanager
Or wait until it is merged into this repo
I installed this plugin just as was suggested. But I am unable to see the tree command. Here is what I am doing.
- In a directory which has many files, I start my editor by running this command -
micro
- Now the editor opens.
- I press Ctrl-E to go into the command mode
- I search for tree (there is nothing). I search for FileManager (there is nothing as well)
Please let me know if I am doing something wrong here.
Thank you for your time and patience.
@gj1118
What os
are you using and terminal.
Also what version of micro editor are you using, I only tested on micro editor Version: 2.0.3.
Have you deleted the old plugin first, if installed. Before testing this version.
Have you got files in ~/.config/micro/plug/filemanager
If you are using windows
it needs installing in a different folder. See micro editor docs for location.
Have you changed the default config folder location?
Try listing the plugins installed with this command below from within micro editor command mode. (Ctl+e)
plugin list
You should see below plugin version number if installed correctly.
filemanager (4.0.0)
I hope this helps and if you can give me the info for the above I will try and help you.
Sorry for the late reply. My Bad.
I am on a Mac OS Mojave 10.14.6. I am using Iterm2 3.3.9
Following is my editor info
micro -version Version: 2.0.2 Commit hash: c51f849 Compiled on February 26, 2020
Yes, I deleted the old plugin first.
Yes, I have got files in ~/.config/micro/plug/filemanager
No, I am not using Windows. No, I have not changed the default config folder location.
When I press Ctrl+E
I can confirm that I do not see the filemanager plugin installed
Let me try installing that first and then I will confirm once again. Thanks for all the help. Much appreciated, kind Sir.
With Regards Gagan
OK , here is what I have done. I have updated micro
to the latest version 2.0.3
. I tried installing filemanager and then executed CTRL + E
to show command mode and then plugin list
but it is not showing me the filemanager plugin in the list. Please see the following screenshot for more information.
Can you please let me know what I am doing wrong here ?
PS. I have restarted micro editor after installing the filemanager
plugin and then restarted micro
editor to check if its installed , but I still get the same result.
Thanks
Have you tried installing another plugin to make sure micro is working correctly. like go and see if it gets listed in the plugins.
plugin install go
you might have to quit and open micro again before the plugin gets listed.
plugin list
Sorry but I can not see why it should not be working if it is in the correct plugin directory.
Sorry it started working. Probably I was doing something wrong. Thanks.
@gj1118 I was having a similar problem (restarting micro seemed to help) but for when I try and run > tree
it says it's an unknown command. I feel like I'm just missing some aspect of the syntax, so any help would be great!
whenever i try to make a new file using touch, micro crashes for some reason
Guys, I've seen that this issue keeps opened and these days I've been passing through the same, can anyone help?
Having this issue as well. :[
Is this abandoned? 2023 and the problem still exists. Maybe the real solution is to let the micro maintainers know to drop the plugin, if its not going to be fixed.
The issue is cloning this repo. It uses deprecated APIs. You can either install a fork or use the plugin install filemanager
method. That checks the official list and downloads an updated version.