News for hackers. Stuff that matters.
Re:Trying out Zed after more than a decade of Vim/Neovim by theonething on Friday January 24, 2025 @11:55PM (#42819621)
> 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`?

Re:Trying out Zed after more than a decade of Vim/Neovim by carb on Saturday January 25, 2025 @02:19AM (#42820103)
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?

Re:Trying out Zed after more than a decade of Vim/Neovim by viraptor on Saturday January 25, 2025 @04:49AM (#42820634)
You lose the open windows/tabs. Apart from trivial one-off scripts I basically never have only a single tab open.
Re:Trying out Zed after more than a decade of Vim/Neovim by carb on Sunday January 26, 2025 @03:45AM (#42828785)
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 by Arch-TK on Sunday January 26, 2025 @08:41AM (#42830053)
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 by aldanor on Saturday January 25, 2025 @07:51AM (#42821345)
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.
Re:Trying out Zed after more than a decade of Vim/Neovim by carb on Sunday January 26, 2025 @03:49AM (#42828807)
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 by Arch-TK on Sunday January 26, 2025 @08:37AM (#42830029)
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 by Arch-TK on Sunday January 26, 2025 @08:36AM (#42830026)
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.