question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto close defx buffer after opening a new file or dir

See original GitHub issue

Hi, @Shougo.

Is there a better way to automatically close the defx buffer whenever I complete an defx#do_action('open')? I’m doing this way:

autocmd BufReadPre,FileReadPre * call s:DelDefxBuffer()

function! s:DelDefxBuffer()
  if bufexists("[defx]")
    exe 'bdelete \[defx\]'
  endif
endfunction

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Shougocommented, Aug 21, 2018

I have checked the sreencasts. The feature is already implemented, so the problem is gone.

1reaction
kristijanhusakcommented, Aug 19, 2018

If you just want to hide it from buffers list, try this:

autocmd FileType defx setlocal nobuflisted

Read more comments on GitHub >

github_iconTop Results From Across the Web

SpaceVim/SpaceVim - Gitter
1. Since I've started using SpaceVim I've been using ctrlspace for project bookmarks and navigating between buffers. It's working almost fine with vimfiler....
Read more >
Defx cool extensions : r/neovim - Reddit
Close defx if it's the only buffer left in the window autocmd WinEnter * if &ft ... and is there a way when...
Read more >
Editing - Neovim docs
vim testfile [change the buffer with editor commands] :w newfile :q. This will create a file ... +{command} Execute {command} after opening the...
Read more >
Find and highlight current file in netrw
Not for opening/closing files or general file management, ... I open netrw automatically when I open gVim, and keep it open to the...
Read more >
Defx: file explorer plugin for Neovim - eed3si9n
To jump to a file after expanding a tree, we can use / to search in the buffer. To close the recursively opened...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found