4 ms·
> 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 n
by theonething 2y ago
> 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`?
- carb 2y agoWhat 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?
- deleted 2y ago[deleted]
- viraptor 2y agoYou lose the open windows/tabs. Apart from trivial one-off scripts I basically never have only a single tab open.
- carb 2y agoThat'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.
- Arch-TK 2y agoI 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.
- aldanor 2y agoYou 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.
- carb 2y agoAh 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.
- Arch-TK 2y agoFor 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.
- Arch-TK 2y agoI 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.