-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Feature Request] Open as new tab instead of new pane #26
Comments
Shouldn't be too hard, but note that when the file opens it will leave the tree view in the previous tab. |
I found the potential function to do this, |
@sum01 |
It might be. Zyedidia's suggestion on how to open a new tab with a prompt could work as well, although have no idea if it requires user input or not. |
Please could someone add this feature? This would almost feel like sublime in the console, if it had this feature. |
check github.com/rvi64/files-plugin |
great! will have a look at it! |
I would rather have it as |
This link is dead (the entire github user is 404), is it moved? |
@karl-gustav That's what happens when someone deletes their github account. Renames them ghost & all their repos go poof. |
@sum01 oh ಠ_ಠ, thanks for the info! |
@karl-gustav Unfortunately not. Must have been deleted on my last cleanup. :( |
This PR gives plugins access to View: zyedidia/micro#1231 So then if that was merged, then maybe something like this might work? https://github.com/sc0ttj/filemanager-plugin/pull/1/files?utf8=%E2%9C%93&diff=unified&w=1 |
@sc0ttj Looks good I suppose. One note, however, is that you wouldn't really want to change that function. That would make everything you open go to a new tab, which isn't the desired outcome. If/when that PR goes through, you'd want to add a new function and a way to trigger it (i.e. with a different keybinding) to open files in a new tab. The original issue poster mentioned using Shift-tab, for example. Either that, or you'd add a parameter that allows the function to do either, and then detect the keybind in any place where that function is used. I think the former is the better of the two options, as it's a lot easier. |
Does anyone know how to do this? The issue linked (zyedidia/micro#1231) has been closed because micro v2 was released but I don't know what's changed in v2 that would allow implementing this functionality. @sum01 regarding the addition of a new function or a parameter I'd just default to opening in a new tab because that's how AFAIK all editors which have a treeview work. |
I belive internal/action/tab.go might be the key for what is needed to close this issue in Micro v2. Accessing @simonvanderveldt Defaulting to opening on a new tab seems strange. I haven't found that to be the default on any editors I've used. Maybe you're confusing tabs and splits? |
OK, I'll see if I can get it to work, don't really know how the lua to go mapping works but I can probably figure that out :)
Hmm, that's strange, from all of the editors I've used zero open files in a split, all of them open files in a new or existing tab. The editors I'm comparing against are GUI editors, which micro would be a replacement for for me. To be specific: IntelliJ, Sublime, Atom, VS Code. |
Hmm. Maybe it's been too long since I've used those to remember if it's a tab or split. I thought VS opened in splits. Nerdtree opens in splits or tabs depending on keypressed, which was what I based the features in my rework on. Could do something like that for this plugin, just need to find another key besides tab that works on scratch-type Micro panes. |
This works for me for the basic action of opening a file in a new tab
But it seems like tabs always take up the whole screen? 😕 |
In many cases, it would be preferrable to open a file in a new tab over the previously selected pane rather than opening a whole new pane. Perhaps by using Shift+Tab instead of just Tab, or some other keyboard shortcut.
The text was updated successfully, but these errors were encountered: