Comments (14)
I suppose [count]-
could force it, so 1-
would skip the warning.
from vim-dirvish.
I'm going to resolve this in my config with this mapping:
nnoremap <silent> - :bwipe <Bar> Dirvish<CR>
I don't know whether it's something you want to follow up here, or whether it's more of a startify issue, or just an unusual edge case for users to work around. Feel free to close.
from vim-dirvish.
what does startify set 'bufhidden' to?
from vim-dirvish.
bufhidden=wipe
from vim-dirvish.
Ah ... I thought of a problem with this solution regarding startify specifically: startify by default presents a list of up to 10 recent files, and maps the numbers 0-9 to open those files. Meaning that 1-
from startify still requires some custom mappings.
from vim-dirvish.
Let's see how common this is. The condition added in 7e41cd7 was somewhat hopeful.
from vim-dirvish.
I just updated my dirvish, it's been awhile, but I'm encountering this as well when trying to navigate files with "-" to move up a directory. Is there anymore info about this? I tried out what @nickspoons suggested but that's not working for me.
from vim-dirvish.
but I'm encountering this as well when trying to navigate files with "-" to move up a directory.
which files...? It certainly shouldn't happen for normal files.
I tried out what @nickspoons suggested but that's not working for me.
Because the mapping there was buffer-local. I've updated the comment, try again.
from vim-dirvish.
@justinmk I just tried the updated comment, unfortunately it's still happening. This is happening while navigating through JS files. If I'm in a file, when I press -
it opens the directory explorer, but pressing that key again does nothing for me. And then if I press enter on a target file, I get the dirvish: E37: Buffer would be deleted
error.
from vim-dirvish.
@blkwtkns well, what does :verbose set bufhidden?
report in these buffers? Sounds like you have a plugin or configuration issue, has nothing to do with dirvish.
If you actually want 'bufhidden' behavior for all of your buffers, just set 'hidden' ...
from vim-dirvish.
So the output of :verbose set bufhidden?
should be hidden
?
from vim-dirvish.
I figured some workaround in my configs, I had the following setup, and just commenting the bufhidden=wipe
line out makes things work again...which seems strange based on what's been discussed here. But it works!
aug DirvishGroup
au!
au FileType dirvish setlocal relativenumber
" au FileType dirvish setlocal bufhidden=wipe
au FileType dirvish nnoremap <buffer><silent> v yy<c-w>p:vs <c-r>=fnameescape(getreg('"',1,1)[0])<cr><cr>
au FileType dirvish nnoremap <buffer><silent> h yy<c-w>p:sp <c-r>=fnameescape(getreg('"',1,1)[0])<cr><cr>
au FileType dirvish nnoremap <buffer> Q <C-w>q
au BufEnter * call NormalizeWidths()
aug END
" command! -nargs=? -complete=dir Vexplore leftabove vsplit | vertical resize 25 | silent Dirvish <args>
" nnoremap - :Vexplore<CR>
command! -nargs=? -complete=dir Vexplore leftabove vsplit | silent Dirvish <args>
With this, output for :verbose set bufhidden?
is just bufhidden=
from vim-dirvish.
So the output of
:verbose set bufhidden?
should behidden
?
No. :set hidden
. In general 'bufhidden' shouldn't be set at all, that is the purpose of this warning.
au FileType dirvish setlocal bufhidden=wipe
Why do you want this? Dirvish depends on Vim to remember the cursor position for visited Dirvish buffers, and other state. Wiping the buffer will break those Dirvish features.
from vim-dirvish.
Related Issues (20)
- `-` (with vim-fugitive) clobbers in-progress git commit messages HOT 2
- The hash value column fails dovish HOT 4
- Setting g:dirvish_relative_paths=1 will disable icon and g:dirvish_mode HOT 2
- [Feature request] Add config for map / HOT 1
- remap :Explore command HOT 4
- Delete buffer HOT 1
- dir up stopped working HOT 9
- Any way to display whether a file is symlinked similar to netrw? HOT 1
- respect b:did_ftplugin HOT 5
- i do have a need to set `&buftype=wipe` for a dirvish buf HOT 6
- Examples for copy, move, delete, rename, create commands HOT 5
- win32 UNC path (in this case: wsl) is not well supported
- Bindings are not silent on neovim HOT 2
- How to tell whether the current buffer is Dirvish? HOT 2
- `vidir` like functionality in dirvish HOT 1
- dirvish_up extremly slow HOT 3
- show the metadata next to filename HOT 1
- [question]: purpose of "forcing normal mode" in filetype normal mode mapping HOT 2
- use :argdedupe if available
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 vim-dirvish.