Live data from Hacker News

Neovim 0.12.0

github.com

251–260 of 271 posts

Re: Neovim 0.12.0

#251
post #138

Earlier quoted context omitted.

Ok, this sounds awesome, but do you miss the GUI integrations? like , being able to pop a document open in your editor from the desktop? It just feels like it's hard to nail down your preferred workflow / setup ... but it's likely worth it if you're using it daily! Are there any good visual or video demos of using this type of setup? I'm having trouble picturing what makes people really love this type of TUI-only wor…

I use Emacs and opening a new file is just pressing “C-x C-f” (find-file), typing the path (completion is available), and pressing enter. As for vim, I would spawn a new terminal (WM keybind, new tab, new pane with tmux), cd to the directory and open it with vim. The nice thing is that I rely only on the keyboard, no need to point with the mouse. It may not be faster, but typing is sequential and there’s no context s…

It's interesting that vim and emacs have this sort of cultural difference where emacs users tend to have one session always open, and vim users are more likely to directly launch a new session per file. I've largely adopted the emacs approach with my usage of neovim, though still use a mix. I have a Session.vim file that opens my windows/tabs/buffers I saved, including remote files using the scp://hostname/filepath syntax. Certain files I edit often enough that I just want them always open, and arranged a particular way. I do sometimes open a one-off separate session to quickly edit a config, though. I don't wanna mess up my muscle memory by introducing too many extra buffers or possibly messing up the order (although if I did do that I could just quit out and reopen the Session.vim file to get back to my saved arrangement).

Another thing I picked up from my time with emacs was making keybinds to interact with the "other" window. One macro I use often will delete the second line of the file in my current window, save, change to the other window, delete second line, save, change back to original window. When activated from keybind it all happens approximately instantly. I also have some binds to jump to the top of the other window's file (without leaving my cursor stuck over there) and so on, letting me keep my cursor in the main area most of the time.

Re: Neovim 0.12.0

#252

Earlier quoted context omitted.

Whats with all the fuss over multicursor. How is this different from just using '.'

dot repeat is the wrong comparison. A closer one would be macros, but even then a good multiple cursors implementation is often faster, more intuitive, and requires less cognitive overhead. One of the better examples of the usefulness of multiple cursors is from Emacs Rocks (link goes to 0:23): https://m.youtube.com/watch?v=jNa3axo40qM&t=23s

The dot command, as you probably well know, is a macro that captures the last change: was it '3cw' or 'cE' or '7s' or s or 'ct)', all changed to the last insert. All intuitively without you even having to think about it.

Much more powerful than "change all my selections to the next input" IMO.

Re: Neovim 0.12.0

#253
post #251

Earlier quoted context omitted.

I use Emacs and opening a new file is just pressing “C-x C-f” (find-file), typing the path (completion is available), and pressing enter. As for vim, I would spawn a new terminal (WM keybind, new tab, new pane with tmux), cd to the directory and open it with vim. The nice thing is that I rely only on the keyboard, no need to point with the mouse. It may not be faster, but typing is sequential and there’s no context s…

It's interesting that vim and emacs have this sort of cultural difference where emacs users tend to have one session always open, and vim users are more likely to directly launch a new session per file. I've largely adopted the emacs approach with my usage of neovim, though still use a mix. I have a Session.vim file that opens my windows/tabs/buffers I saved, including remote files using the scp://hostname/filepath s…

Vim current directory is tied to the process, while each buffer in Emacs have its own default directory.

Also the buffer’s local variable in vim comes from different sources. In emacs, a lot of stuff are tied to a major or minor mode. You only have to toggle them to switch between keybinds, syntax,…

Re: Neovim 0.12.0

#254

I swapped to neovim and never looked back. I don't even have vscode, jetbrains or anything similar installed anymore. AI has made it so so easy to get into neovim and make anything work no matter how obscure it is. The biggest benefit for me which I haven't realized how good it is with tmux and the low low memory usage. I mean I can keep EVERY project I work on open, quickly switch and maintain. No more 10gb memory u…

What plugins do you use for AI in neovim?

Re: Neovim 0.12.0

#255
post #254

I swapped to neovim and never looked back. I don't even have vscode, jetbrains or anything similar installed anymore. AI has made it so so easy to get into neovim and make anything work no matter how obscure it is. The biggest benefit for me which I haven't realized how good it is with tmux and the low low memory usage. I mean I can keep EVERY project I work on open, quickly switch and maintain. No more 10gb memory u…

What plugins do you use for AI in neovim?

Not OP, but I don't have use AI within neovim itself, but you can use AI tools to learn and configure neovim to fit your needs.

Re: Neovim 0.12.0

#256
post #159

Earlier quoted context omitted.

Am I misremembering cause I could have sworn that Aider started out as a nvim plugin?? https://github.com/Aider-AI/aider

That project is half dead now. There are commits, but has been no release in half a year, is missing major features (e.g. MCP server), and I haven't seen people talking about it for quite a while.

Nuts to let a 42k starred project just fade away. Seems like it could really have been something. I remember being supe rimpressed w it when I installed it in its first few months.

Re: Neovim 0.12.0

#257
post #56

Earlier quoted context omitted.

I'd stick to lazy.nvim for now. Lazy loading is really neat and lazy.nvim's ability to specify plugin dependencies isn't something vim.pack has either. I'd guess if you don't care about lazy loading and OK with just loading everything all the time - vim.pack is great to have as a built-in.

That's my impression too. However, I might give `vim.pack` a go for the novelty. That being said, there is a way to lazy-load the plugins — Evgeni has a guide for that [1]. The "Load not during startup" variant is really simple with putting `vim.pack.add()` into `vim.schedule()`. The other myriad of options (keys, cmds, event) that lazy.nvim provides would require you to set up appropriate autocommands. It gives me v…

Thanks for the pointer. I guess to simulate what lazy.nvim does with loading plugins based on user commands, you can use something like this:

``` vim.api.nvim_create_autocmd("User", ... ```

But it only solves the actual lazy part. Not sure how you can solve defining plugin dependency graph for such loading that lazy.nvim allows.

I can try experimenting with it anyway.

Re: Neovim 0.12.0

#258

Up next for 0.13: multiple cursors! I have no idea what I'd do with this feature but it sounds intriguing. https://neovim.io/roadmap/

Looking forward to multiple cursors… but Vim/Neovim can already do some of the common use-cases for multiple cursors, like prepending (or appending) text to a bunch of lines using visual block mode [1]. Here’s a video example [2]: [1]: https://neovim.io/doc/user/usr_10/#_visual-block-mode [2]: https://www.reddit.com/r/vim/comments/jai57c/the_usefulness_...

Yes, and I use those. But it would be nice if it could be generalized to cases where the places that need to be edited didn't line up nicely in a block.

Re: Neovim 0.12.0

#259
post #173
post #75

Earlier quoted context omitted.

What do you when the things you want to change don't all fit on the screen at once?

That's one challenge I haven't seen editors tackle correctly by, e.g. having some special condensed view where only lined with cursors are shown so you can see more cursors on the screen and easier scroll around to see even more skipping the rest of the text (like some git diff tools do, showing only diffs with minimal context) So you either cycle through cursors (if your editor has a concept of "primary cursor") to…

This strikes me as a good idea I've never seen articulated before. Something like a sticky scroll which accrues all off screen cursors, limited to some max to prevent things getting out of hand.

Re: Neovim 0.12.0

#260
post #153

Earlier quoted context omitted.

Which is why I just went with Helix and learned their keybindings. I have much more important things to do than figuring out why a plugin stopped working.

Just pin the plugin or don't use it.

Neovims API isn't (yet) fully stable. So updating neovim could also break a plugin.
Post reply on HN