Comments (5)
When that happens, even if you can close the window with
<C-w>o
, you can't reopen the file explorer afterwards. It requires to restart neovim and it's a bit of a workflow breaker.
I briefly checked earlier and I could open it up again. After rechecking again, I can definitely reproduce it not opening again, but not on the first try and under some not trivial steps.
I agree, having to account for opened explorer in mappings is not ideal and should not be required. I'll take a look (at least there is 'winfixbuf' option in Neovim>=0.10 which seems to make it work by showing error but explorer is still valid).
It may be better to check if a file explorer is open and if its false do the command, else do nothing than to close it if it's true, but I don't know how to do that as of now (is there a way by checking the MiniFiles events ? or a function ?).
Although shouldn't be needed for this case, I plan to add such function soon because there is a #1162 that could benefit from it.
from mini.nvim.
Thanks for the issue!
I can reproduce. not sure if this is a reasonable use case to account for though: neither deleting a buffer nor switching to another one makes sense inside a file explorer. And all the windows after the error can be closed with <C-w>o
(and the fact that they don't close automatically may the real issue here). I'll think about it.
from mini.nvim.
Thanks for the issue!
I can reproduce. not sure if this is a reasonable use case to account for though: neither deleting a buffer nor switching to another one makes sense inside a file explorer. And all the windows after the error can be closed with
<C-w>o
(and the fact that they don't close automatically may the real issue here). I'll think about it.
I'm happy to help.
For me, the problem does not lay in the use case (because like you said, it does not make sens to switch buffer or close buffer in the file explorer) but in the fact that opening the file explorer, switching buffers or closing buffers are common things to do. For example, I hit the switch buffer or close buffer key without closing the file explorer, because I made a mistake or I typed to quickly. When that happens, even if you can close the window with <C-w>o
, you can't reopen the file explorer afterwards. It requires to restart neovim and it's a bit of a workflow breaker.
As a workaround, I manually modified the keybindings to add the following in my config files:
if not require("mini.files").close() then
-- The command
end
I'm pretty sure that it's not the best way to do that. It may be better to check if a file explorer is open and if its false do the command, else do nothing than to close it if it's true, but I don't know how to do that as of now (is there a way by checking the MiniFiles events ? or a function ?).
from mini.nvim.
This should now be resolved on latest main
, but only for Neovim>=0.10. Trying to switch buffers will show an error (which is expected because 'mini.files' windows are expected to show only dedicated buffers) but explorer will be fully usable afterwards. The reason it is resolved only on Neovim>=0.10 is because it introduced the 'winfixbuf' option which allows permanently "pair" window and buffer.
from mini.nvim.
Related Issues (20)
- mini.sessions get error when use nui instead of vim.ui.select HOT 1
- mini.diff reset hunk when invoked does not track cursor position. HOT 1
- mini.undotree HOT 1
- Keywords like local and function are not highlighted in mini.hues colorscheme HOT 3
- mini.regex, mini.startuptime, mini.indentlines, mini.rainbow HOT 4
- mini.indentscope disrupting helpview.nvim extmarks. HOT 2
- ASCII glyphs for 'init.lua' and 'README.md' are not displayed correctly in mini.files HOT 3
- Restrict Navigation Outside Initial Directory in mini.files HOT 5
- mini.files closes and does not reopen HOT 2
- `mini.operators` replace until end of line HOT 1
- Add support for highlight groups of listed plugins HOT 7
- Add border options for mini.completion HOT 1
- [mini.extra] Picker for LSP code actions HOT 8
- Option to disable buffer word completion for mini.completion on large files. HOT 3
- Add options to toggle default plugins of vim like gzip, compiler in mini.basics HOT 1
- mini.hues: Strikethrough does not work in Markdown files using Treesitter HOT 2
- :DepsListPlugins to list all installed plugins. HOT 3
- Issue with insert mode in mini.files when configuring height of window HOT 2
- Add pickers for LSP Incoming and Outgoing Calls HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mini.nvim.