Skip to content
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

Netrw integration #56

Open
rawaludin opened this issue May 3, 2018 · 2 comments
Open

Netrw integration #56

rawaludin opened this issue May 3, 2018 · 2 comments

Comments

@rawaludin
Copy link

Hi, thanks for the plugin!

Is it possible to show netrw buffer too?
Currently its not showing and surprise me when I do :bp the buffer switch to netrw buffer, not the buffer on tab list.

Thanks.

@ap ap added the enhancement label May 3, 2018
@ap
Copy link
Owner

ap commented May 3, 2018

Glad you enjoy it 😊

Netrw is problematic because each directory browser uses two buffers – the listed one you navigate to, which is empty, and then another unlisted buffer, where the directory contents are actually rendered. When you try to switch to the listed buffer it catches you and switches to the unlisted one instead. It’s… weird. Because of reasons – see #25 and #31 for details.

Given that this is the third issue about Netrw support (maybe no surprise since it ships with Vim), I’m now thinking that if I can find a hack to support it anyway, I ought to. I’ll see if I can figure something out.

@gibfahn
Copy link
Contributor

gibfahn commented May 29, 2018

FWIW @ap's solution in #25 (comment) works great, you just add:

Plug 'ap/vim-readdir' " Assuming you use vim-plug.

let g:loaded_netrw = 1
let g:loaded_netrwPlugin = 1 " Don't use the built-in file browser (use vim-readdir instead).

And you get a (IMO) much nicer file browser, o and t to open files is everything I've needed so far.

The one downside is that it breaks gx to open URLs in the browser, so you'd need to use another plugin that provides that functionality (or write a little function).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants