Skip to content
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

Open filemanager on new tab #56

Open
supbish opened this issue Apr 3, 2021 · 4 comments
Open

Open filemanager on new tab #56

supbish opened this issue Apr 3, 2021 · 4 comments

Comments

@supbish
Copy link

supbish commented Apr 3, 2021

Feature suggestion -- you know "openonstart?"

filemanager-openonstart | Automatically open the file tree when starting Micro | false

Take it to the next level:

filemanager-openontab | Automatically open the file tree when opening a new tab | false

This would open filemanager any time you hit Ctrl-T.

We could then hit Ctrl-T before opening a file from the tree when we want it in a tab instead of a split.

Maybe this would also satisfy #53, #47, #26

@supbish
Copy link
Author

supbish commented Apr 3, 2021

...maybe it could also "closeontab" when you Ctrl-Q out of the file you opened?

@supbish
Copy link
Author

supbish commented Apr 3, 2021

I've hacked very basic support for this into my copy of filemanager.lua:

function onAddTab(view)
	open_tree(view)
end

This can really only work if all trees share the same buffer, which they don't right now... but only the last tree opened appears to be functional anyway (whether you use this hack or the "tree" command after opening a new tab), so I guess you might as well have all open trees share the same buffer if possible.

@godalming123
Copy link

You could just add another filemanger command like:

lua:filemanager.tree_in_tab

And then you can have one command to toggle the tree on the open tab and another to open it in a new tab

@jakkunight
Copy link

Check this #66!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants