Live data from Hacker News

Trying out Zed after more than a decade of Vim/Neovim

sgoel.dev

141–150 of 154 posts

Re: Trying out Zed after more than a decade of Vim/Neovim

#141
post #121

Earlier quoted context omitted.

What I find strange about an open source product funded by VC money is that all of the people are helping make it a better editor and yet when they eventually exit none of the money will go to them. Compare that to vim where it's truly an open source product.

I think you are not very accurate about “open source product” vs something like “community led project”. People being able to adapt their software to their own needs by making changes to the code is exactly what open source is about. This is good. What is a problem though, is to have the code merged in the main repository requires you to gift them the rights to your code (not just license it). They are also not very…

No, I don't mean it from like a licensing or legal perspective at all. I'm thinking more of vibes and ethos.

There is something strange where you are sort of making your product better through open source contributions and yet all of the capital gains from your company's eventual sale will only go to you.

There is something really weird and nasty about that.

Re: Trying out Zed after more than a decade of Vim/Neovim

#142
post #134

Earlier quoted context omitted.

Then it isn’t json anymore! Don’t call it that

I wonder if we can come up with an agreed name for almost json stuff... Maybe json+ and we can tac-on additional characters for what's added. json+c (plus comments), json+t (plus trailing commas), json+tc or json +ct (plus comments and trailing commas), and so on

json5[1] is a thing.

[1] https://json5.org

Re: Trying out Zed after more than a decade of Vim/Neovim

#143
I just did the same switch for the same reasons, except I was a newbie to Neovim. The Vim keybindings and way it "handles things" is amazing, but the Neovim-powered bridge to getting it to be a full IDE with bulletproof config and extension support was a PITA out of the box.

Generally I want things to "just work" and if there's extra fancy settings I'm happy to learn them later / slowly as a I go through it. Minor updates to plugins in Neovim would break things, a lot of the error output was next to useless, and I spent waaaaaay too much time debugging what was wrong.

I switched to Zed w/ Vim keybindings and it's a perfect balance.

Re: Trying out Zed after more than a decade of Vim/Neovim

#144
post #100

Earlier quoted context omitted.

What editor state are you losing when you leave vim? I run a pretty light vanilla vimrc (60 lines maybe) and with two lines you can enable vim undofiles and returning the cursor to the last location upom reopening a file. For me, quitting vim is functionally equivalent to ^Z?

You lose the open windows/tabs. Apart from trivial one-off scripts I basically never have only a single tab open.

That's true for me too but usually my tabs and windows are managed one level higher, by the terminal emulator, or I'm opening vim with -o/-O to open a split window directly.

Re: Trying out Zed after more than a decade of Vim/Neovim

#145
post #100

Earlier quoted context omitted.

What editor state are you losing when you leave vim? I run a pretty light vanilla vimrc (60 lines maybe) and with two lines you can enable vim undofiles and returning the cursor to the last location upom reopening a file. For me, quitting vim is functionally equivalent to ^Z?

You may lose LSP state like rust-analyzer's which takes a while to restore. You may lose opened buffers and positions within them (unless you have some session restore logic which may also take time), window layout, copy buffers, edit history and lots of other state.

Ah I don't run any LSPs so that's fair.

Retaining positions, buffers, and edit history between sessions is all straightforward in vanilla vim though. Unless you run an autolinter or formatter that edits your target file and wipes the history.

Re: Trying out Zed after more than a decade of Vim/Neovim

#146
post #64

Earlier quoted context omitted.

I've always just closed vim to use the terminal, and started it up again to go back to editing. I find it difficult to operate any other way. I know people who use ^Z to suspend vim and then foreground it again.

> I've always just closed vim to use the terminal You don't mind losing all your editor state? If you don't like working with multiple terminal windows, why not open a term within vim with `:term`?

I don't lose any editor state, at least nothing I care about.

In my configuration vim will save (among other things):

- Cursor position

- Undo history

- Register state

:term is clunky for me, mainly because my muscle memory is to just :wq

I got it working as seamlessly as I could once just in an attempt to use it but I stopped pretty quickly.

Re: Trying out Zed after more than a decade of Vim/Neovim

#147
post #100

Earlier quoted context omitted.

What editor state are you losing when you leave vim? I run a pretty light vanilla vimrc (60 lines maybe) and with two lines you can enable vim undofiles and returning the cursor to the last location upom reopening a file. For me, quitting vim is functionally equivalent to ^Z?

You may lose LSP state like rust-analyzer's which takes a while to restore. You may lose opened buffers and positions within them (unless you have some session restore logic which may also take time), window layout, copy buffers, edit history and lots of other state.

For that there is ra-multiplex (to which I contributed sockets support).

I don't use any other LSPs which have a long warmup time, but if I did then they can also be used behind ra-multiplex.

Re: Trying out Zed after more than a decade of Vim/Neovim

#148
post #100

Earlier quoted context omitted.

What editor state are you losing when you leave vim? I run a pretty light vanilla vimrc (60 lines maybe) and with two lines you can enable vim undofiles and returning the cursor to the last location upom reopening a file. For me, quitting vim is functionally equivalent to ^Z?

You lose the open windows/tabs. Apart from trivial one-off scripts I basically never have only a single tab open.

I don't use tabs, sometimes I use split windows (usually only when vim-diffing), mostly I use multiple terminal windows in a tiling WM. I do use multiple buffers but I usually don't care about editing more than one or two at a time and it's easy to re-open these whenever I need to.

Re: Trying out Zed after more than a decade of Vim/Neovim

#149

Earlier quoted context omitted.

It only opens the terminal by default. The key binding is to use the same shortcut to focus back to the editor.

It does that by default too.

It didn't when I set it up, but I haven't removed the keybindings to test if this has changed recently.

Re: Trying out Zed after more than a decade of Vim/Neovim

#150
post #79

> all the configuration that goes into it before I can use it to start writing code. Yes, this is awful and something the default should've changed years ago instead of continuing this massive collective time waste. But presumably after 15 years you've configured almost everything you need? At least to the point of matching a static config file? > Lua is great, but one JSON file is even better. No way, it's a strict…

i don't think vim is that bad out of the box. when i ssh into a box and need to get work done, i can install it and use sane defaults with pretty high productivity.

i'm used to a plugin- and config-light setup on my personal systems, with most of the customization being stuff like latex compilation and preview from a keybind rather than major changes to default behavior, but the whole "vim needs a bazillion lines of config!" thing isn't really true. some people like to spend a week bikeshedding it but it's by no means necessary. i've had the same vimrc for years and years and basically never need to change it.

Post reply on HN