Live data from Hacker News

Show HN: VS Code extension to edit the filesystem like a text buffer

github.com

1–10 of 50 posts

Show HN: VS Code extension to edit the filesystem like a text buffer

#1
This is a spiritual adaptation of oil.nvim for vscode. The main idea is you edit the filesystem by editing the current directory listing's text buffer. For example, if I want to rename a file, I just rename it in the listing file. This is extremely powerful because it translates all of your text-editing skills immediately into file editing capabilities.

Some features:

* Create/rename/move/delete files by editing the current directory listing's textbuffer

* Filter using glob pattern

* Trash and undo support

* Works even in remote-ssh workspaces

* Works across multiple vscode windows

Show HN: VS Code extension to edit the filesystem like a text buffer
github.com

Re: Show HN: VS Code extension to edit the filesystem like a text buffer

#4

"Look what they need to mimic a fraction of our power" - some Emacs user, probably

I don't use emacs so I may not be familiar with the full power, but if you are referring to dired, I think oil.nvim is much, much more powerful than dired.

The major difference being that you still need to learn some new keybinds for dired, for example, you can't just create a file by editing the text buffer whereas in oil.nvim (and by extension, voil) your text editing skills immediately apply.

Re: Show HN: VS Code extension to edit the filesystem like a text buffer

#5
post #3

"Look what they need to mimic a fraction of our power" - some Emacs user, probably

Some vim user too! oil.nvim is a pretty popular package that does this.

I obviously love oil.nvim and that's why I ported it to vscode. But I think in some ways voil is even more powerful than oil. Specifically:

- It can work across multiple vscode windows

- The top line (that shows the current directory) can be used to filter files. For example, if you add "*.{txt,md}" to the end of that line, it will only show the txt and markdown files.

- The ability to defined custom shell commands and bind keybindings to them. For example, I can create a command that zips selected files and run it with a single keybinding in voil.

- Undo functionality

Re: Show HN: VS Code extension to edit the filesystem like a text buffer

#7

"Look what they need to mimic a fraction of our power" - some Emacs user, probably

I don't use emacs so I may not be familiar with the full power, but if you are referring to dired, I think oil.nvim is much, much more powerful than dired. The major difference being that you still need to learn some new keybinds for dired, for example, you can't just create a file by editing the text buffer whereas in oil.nvim (and by extension, voil) your text editing skills immediately apply.

You can switch to wdired and then edit the filenames etc. But true you can't create/delete files. Creating empty files is rarely useful or necessary, though, so not sure why you'd want that. Deleting files is more useful but that seems perfect in normal dired as you can see what you've marked rather than try to mentally keep track of lines you've already deleted.

Re: Show HN: VS Code extension to edit the filesystem like a text buffer

#8

haha yeah this'll never bee a problem with AI plugged into your VSCode :-D

Since voil uses its own file extension (.voil) you can easily disable copilot for voil windows.

Also voil asks you to confirm destructive actions. And even if you do, by default voil moves deleted files to a trash location and has undo functionality so you can easily undo your mistakes.

Re: Show HN: VS Code extension to edit the filesystem like a text buffer

#9

Earlier quoted context omitted.

I don't use emacs so I may not be familiar with the full power, but if you are referring to dired, I think oil.nvim is much, much more powerful than dired. The major difference being that you still need to learn some new keybinds for dired, for example, you can't just create a file by editing the text buffer whereas in oil.nvim (and by extension, voil) your text editing skills immediately apply.

You can switch to wdired and then edit the filenames etc. But true you can't create/delete files. Creating empty files is rarely useful or necessary, though, so not sure why you'd want that. Deleting files is more useful but that seems perfect in normal dired as you can see what you've marked rather than try to mentally keep track of lines you've already deleted.

> Creating empty files is rarely useful or necessary

I kind of disagree? Most files were once created as an empty file! (at least that's the case in my workflow).

Re: Show HN: VS Code extension to edit the filesystem like a text buffer

#10

Earlier quoted context omitted.

You can switch to wdired and then edit the filenames etc. But true you can't create/delete files. Creating empty files is rarely useful or necessary, though, so not sure why you'd want that. Deleting files is more useful but that seems perfect in normal dired as you can see what you've marked rather than try to mentally keep track of lines you've already deleted.

> Creating empty files is rarely useful or necessary I kind of disagree? Most files were once created as an empty file! (at least that's the case in my workflow).

I've always just used `:e ` - never saw the appeal of oil.nvim for that use case. But for other kinds of modifications it's nifty.
Post reply on HN