-
Notifications
You must be signed in to change notification settings - Fork 131
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
Opening a file without closing Oil #399
Comments
Hi @6H075T2, you are probably looking for the ["<C-s>"] = "actions.select_vsplit",
["<C-h>"] = "actions.select_split",
["<C-t>"] = "actions.select_tab", |
Hello @jakubbortlik, I'm fairly new to Neovim's ecosystem and I'm used to editing files per buffer because my monitor is too small to handle multiple splits. I want the same functionality as the GIF above where I can open files in Oil in a new buffer without closing Oil. |
Oh, I see, I didn't notice that you are opening the new buffers in individual tabs. Well, I'm not used to this kind of workflow, and I'm not sure this is fully supported in oil.nvim. The return {
'stevearc/oil.nvim',
opts = {
float = {
max_width = 80,
},
keymaps = {
["<C-t>"] = '<cmd>lua require("oil").select({close=false, tab=true}, function() require("oil").open_float() end)<cr>',
},
},
config = function(_, opts)
require("oil").setup(opts)
vim.keymap.set("n", "-", "<CMD>lua require('oil').open_float()<CR>", { desc = "Open parent directory in floating window" })
end
} |
Thanks for your help @jakubbortlik. I'm hoping the maintainer sees this and find a way to implement it would be a great help. |
Yea, this doesn't appear to work
I see the work-around mentioned above involving the 2 step approach (select, open_float()) but can foresee edge cases like that follow-up open_float opening cwd rather than the path where the user was when selecting the file. That said, it would be much cleaner to know |
Did you check existing requests?
Describe the feature
I want to open a file in Oil without closing Oil after opening a file in a new buffer. Is there any way to do this?
Provide background
Sometimes I'm working with multiple files and want to open them with Oil and it gets tedious if every time I open a file, I do the process of opening Oil and selecting the file again and again.
What is the significance of this feature?
nice to have
Additional details
Mini.files have similar feature with their go_in function.
The text was updated successfully, but these errors were encountered: