GithubHelp home page GithubHelp logo

Comments (14)

justinmk avatar justinmk commented on August 25, 2024 1

I suppose [count]- could force it, so 1- would skip the warning.

from vim-dirvish.

nickspoons avatar nickspoons commented on August 25, 2024 1

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.

justinmk avatar justinmk commented on August 25, 2024

what does startify set 'bufhidden' to?

from vim-dirvish.

nickspoons avatar nickspoons commented on August 25, 2024

bufhidden=wipe

from vim-dirvish.

nickspoons avatar nickspoons commented on August 25, 2024

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.

justinmk avatar justinmk commented on August 25, 2024

Let's see how common this is. The condition added in 7e41cd7 was somewhat hopeful.

from vim-dirvish.

blkwtkns avatar blkwtkns commented on August 25, 2024

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.

justinmk avatar justinmk commented on August 25, 2024

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.

blkwtkns avatar blkwtkns commented on August 25, 2024

@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.

justinmk avatar justinmk commented on August 25, 2024

@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.

blkwtkns avatar blkwtkns commented on August 25, 2024

So the output of :verbose set bufhidden? should be hidden?

from vim-dirvish.

blkwtkns avatar blkwtkns commented on August 25, 2024

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.

justinmk avatar justinmk commented on August 25, 2024

So the output of :verbose set bufhidden? should be hidden?

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.