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.

Using rnvimr as a netrw replacement closes existing window splits/buffers

See original GitHub issue
  • nvim --version: NVIM v0.7.0-dev+1252-gce537bb23
  • Operating system/version: Arch (Linux 5.16.14-arch1-1 1 SMP PREEMPT Fri, 11 Mar 2022 17:40:36 +0000 x86_64 GNU/Linux)
  • nvim +'checkhealth rnvimr':
rnvimr: health#rnvimr#check
========================================================================
## OS
  - OK: Name: Linux

## Ranger
  - OK: Version: ranger 1.9.3

## Python
  - OK: Version: 3.10.2 (main, Jan 15 2022, 19:56:27) [GCC 11.1.0]

## Pynvim
  - OK: Version: 0.4.3

## Ueberzug (optional)
  - OK: Ueberzug is ready

## RPC
  - OK: RPC echo: Neovim send "Give me five!" and receive "Give me five!"

Describe the bug Using rnvimr to edit a folder, e.g. with :e . causes existing window splits to close. It is unclear to me if the splits close or the buffers themselves are closed, but I’m currently leaning towards the last alternative, since I’ve found this same bug to close open tabs when there is only one buffer displayed in the window.

To Reproduce using nvim -u mini.vim

Example: cat mini.vim

call plug#begin('~/.config/nvim/plugged')
Plug 'kevinhwang91/rnvimr'
call plug#end()

let g:rnvimr_enable_ex = 1

Steps to reproduce the behavior:

  1. In neovim, open any file (e.g. :e test.json)
  2. Split screen (split or vsplit) and open another file (e.g. :e test.html). Stay on this second split.
  3. Now use rnvimr has a netrw replacement to edit the current folder: :e . and press enter.
  4. Watch has the new split closes as soon as ranger appears.

Expected behavior Ranger window appears and nothing happens to the splits or buffers that were previously open until a new file is selected within ranger. Opening the file in ranger should replace the buffer in the newly open split. No splits should be closed when ranger appears.

Thanks in advance. Love this plugin!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kevinhwang91commented, Mar 16, 2022

Please try the updated code.

1reaction
kevinhwang91commented, Mar 15, 2022

Fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

netrw 162m closes and deletes current window/buffer ... - GitHub
How to replicate: Open a file in vim, either command vim filename.ext or from vim :e filename.ext. Open netrw explorer in vertical split...
Read more >
Replace netrw window when opening a file
I'd like to be able to :Sex when editing a file, select a file, press CR, and have that new split populated with...
Read more >
Automatically closing Netrw window after :Vex : r/vim - Reddit
split the current window in two,. show the file explorer in the new window,. select the file to open in the now current...
Read more >
Using rnvimr as a netrw replacement closes existing window splits ...
Expected behavior Ranger window appears and nothing happens to the splits or buffers that were previously open until a new file is selected...
Read more >
How do I automatically close the netrw pane after having ...
Seems to me that opening a file in a new buffer and closing the netrw pane is actually the same as opening a...
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