Live data from Hacker News

Show HN: CuteVim – Portable Vim with a cute vimrc

github.com

1–10 of 74 posts

Re: Show HN: CuteVim – Portable Vim with a cute vimrc

#3
post #2

It's not clear what this is. Is it Vim as a single executable? Is so, what is this doing? ./vim.com -u /zip/usr/share/vim/vimrc

Looks like Vim compiled with Actually Portable Executable [1] headers to make a cross-platform (and perhaps also bare metal) vim binary.

But I apparently am distracted by shiny things and couldn't focus on any of the other stuff after seeing rainbow indentation for the first time.

[1]: https://justine.lol/ape.html

Re: Show HN: CuteVim – Portable Vim with a cute vimrc

#4
post #2

It's not clear what this is. Is it Vim as a single executable? Is so, what is this doing? ./vim.com -u /zip/usr/share/vim/vimrc

The actual binary (vim.com in this case) is also a valid zip file, which it can read and write as a private virtual mount point. /zip refers to files inside the binary, inside the zip file.

Redbean web server (by the author of Cosmopolitan, Justine.lol) also uses this method to store its web root.

Re: Show HN: CuteVim – Portable Vim with a cute vimrc

#5
post #2

It's not clear what this is. Is it Vim as a single executable? Is so, what is this doing? ./vim.com -u /zip/usr/share/vim/vimrc

> Is it Vim as a single executable?

Basically; it's using the "Actually Portable Executable" system to make a single binary that includes everything it needs including enough portability stuff to run on different systems directly.

> Is so, what is this doing?

When I say "everything it needs", that includes files; APE binaries, AIUI, include some code to transparently read files embedded in themselves, so that line says "run this vim binary, but when it starts instead of reading the user's normal .vimrc (if any), read the vimrc that we embedded in this binary under the virtual /zip path"

Re: Show HN: CuteVim – Portable Vim with a cute vimrc

#6
post #2

It's not clear what this is. Is it Vim as a single executable? Is so, what is this doing? ./vim.com -u /zip/usr/share/vim/vimrc

Looks like Vim compiled with Actually Portable Executable [1] headers to make a cross-platform (and perhaps also bare metal) vim binary. But I apparently am distracted by shiny things and couldn't focus on any of the other stuff after seeing rainbow indentation for the first time. [1]: https://justine.lol/ape.html

> Rock musicians have a love-hate relationship with dynamic range compression, since it removes a dimension of complexity from their music, but is necessary in order to sound professional. Bloat might work by the same principles,

Speaking of which I am a bloated rock musician. I don't feel seen.

Re: Show HN: CuteVim – Portable Vim with a cute vimrc

#10

> saving backups of files in ~/.vim/backup every time you save, and keeping an undo-per file Is this a security risk? Not complaining, as it can be changed in the vimrc, just want to pose the question.

For a file to end up in ~/.vim/backup you need to have (had) the right to edit it in the first place. (I assume) files that are edited as root would go into the root home directory, so no problem.

I can maybe see it be a problem for servers but I can't really think of a likely case, you would have to mess up pretty badly.

Post reply on HN