home.social

#netrw — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #netrw, aggregated by home.social.

  1. Just noticed that the #netrw plugin repository got archived: github.com/saccarosium/netrw.v

    Was it merged into vim or what is happening?

    #vim #neovim

  2. I keep coming back to this article when I need a refresher on VIM's Netrw.

    shapeshed.com/vim-netrw/

  3. In addition of using the minus key to open #Netrw for the current file's parent directory, I've now added some logic to Netrw buffers in my #Vim 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.

    codeberg.org/scy/dotfiles/src/

  4. #Vim (and #Neovim) will trigger `au FileType netrw` autocommands, as well as commands in after/ftplugin/netrw.vim when

    • selecting a directory in a #Netrw buffer
    • selecting a file in a Netrw buffer (i.e. when _leaving_ Netrw)

    but _not_ when first entering Netrw, e.g. by calling :Explore

    Even though :set ft? will display 'netrw' no problem.

    What the fuck?! I'm at a loss here, any hints greatly appreciated. :BoostOK:

    Reproduce by doing

    • nvim --clean
    • :au FileType netrw echo 'netrw'
    • :e .

  5. With the minus key being the default #Netrw (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.

    #Vim #Neovim

  6. ughhh, #Netrw is such a mess.

    But it comes with every installation of #Vim and #Neovim, so as someone who enjoys minimalism and likes to keep the number of additional plugins to a minimum, I feel like I should learn to use it and integrate it into my workflow.

    But I've just used :Rexplore on a dirty file with 'nohidden' and it simply replaced my file's contents with the directory listing 😬

    Also, don't make the mistake of looking at its source, or visiting the maintainer's "website" …

  7. [2/5]

    #netrw to browse files, so it's very handy.

    vim-scripts/BufOnly.vim – I work in vim all day, so I easily end up with many dozens or even hundreds of open buffers. This is the easiest way to close all but the currently active one.

    *CODING*

    cohama/lexima.vim - auto-closes (), {}, "" and some such pairs

    alvan/vim-closetag – auto-closes and auto-indents #HTML/#XML tags. I write a lot of HTML/JSX, so this saves me a lot of keystrokes.

  8. Not sure if I should be proud or sad that I was able to report two bugreports for #neovim's #netrw this week. Netrw is the file browser plugin that comes by default with #vim and neovim. Unfortunately, it is written in vimscript, and is stable in a sense that it seems to receive updates only every other year or so. So chances of these bugs getting fixed are pretty slim.

    github.com/neovim/neovim/issue
    github.com/neovim/neovim/issue

  9. Current situation will clobber my #netrw file tree, and open the file there

  10. Ok, #vim question for you all. How can I get #fzf and #netrw to play nice together? I want a file tree to open up when I start vim (got that done with the vim config and netrw config) but sometimes I want to search for files. Monoliths are big, and I know I want something "admin\..." but now where.

    How can I get my fzf preview file to open in the already existing window?