scy,
@scy@chaos.social avatar

With the minus key being the default (and oil.nvim) shortcut for "change into parent directory", TJ DeVries suggested to globally (i.e. in normal edit buffers) map minus to "open Netrw (or oil) in the current window", and I think that's really clever.

Like, <CR> moves down into a directory or file, and - moves up into the parent directory – either of the directory you're currently browsing, or the file you're currently editing. Like a global "zoom out" key.

scy,
@scy@chaos.social avatar

In addition of using the minus key to open for the current file's parent directory, I've now added some logic to Netrw buffers in my config that will try to position the cursor on the file that you've just edited, for additional continuity.

It's not perfect, but it's a start.

https://codeberg.org/scy/dotfiles/src/commit/f154f9604f3f8d66bd6bfa2854613e34b0c1f5ce/.vim/after/ftplugin/netrw.vim#L19-L37

  • All
  • Subscribed
  • Moderated
  • Favorites
  • vim
  • DreamBathrooms
  • magazineikmin
  • InstantRegret
  • tacticalgear
  • ethstaker
  • rosin
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • Durango
  • thenastyranch
  • ngwrru68w68
  • tester
  • normalnudes
  • cisconetworking
  • Leos
  • love
  • cubers
  • osvaldo12
  • mdbf
  • anitta
  • provamag3
  • modclub
  • GTA5RPClips
  • megavids
  • JUstTest
  • All magazines