I'm getting very strange behaviour when I try to expand the listing of a folder by pressing enter. Take the following screenshot

enter image description here

Currently, I have file 2.1 open. But when I press Enter on 1/ to expand it, 2/ first closes and then I have to press Enter again to finally expand 1/.

Is there a way to avoid this so that 2/ never closes in the first place?

Edit: Here are my netrw settings

let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_winsize = -28
let g:netrw_banner = 0
  • 1
    Any chance this issue is related to :h netrw-s-cr?
    – lsrdg
    May 13, 2017 at 10:29
  • Not sure. I've updated my post with my netrw settings
    – tushar
    May 13, 2017 at 17:06
  • Sorry, can't reproduce it. But from :h netrw-s-cr: When the tree listing style is enabled (see |netrw-i|) and one is using gvim, then the <s-cr> mapping may be used to squeeze (close) the directory currently containing the cursor.
    – lsrdg
    May 14, 2017 at 5:36
  • I'm only hitting <cr>, not <s-cr> and the problem persists even on terminal vim.
    – tushar
    May 14, 2017 at 9:02
  • Ok. My doubt was actually what would happen if pressing <s-cr> (if it had worked, a simple remap would be a workaround). Have you tried vim -u NONE -N? Or maybe even some binary search: github.com/mhinz/vim-galore#general-tips ?
    – lsrdg
    May 14, 2017 at 9:51


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.