Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 usage on a SINGLE project, no more laggy remote access, no more dreading reboots, no more wasting time.

Kernel panic? everything is right there how you left it, honestly it makes me feel so sad because the poor design of IDE's have been such a show-stopper for a LOT of good project designs that I have completely avoided due to introduced complexities that come not to mention how slow things can become.

Now I can just ssh into my pc from a laptop and work, no synchronization, no need to have a beefy laptop and incredible battery life.



I've been using Vim daily for 13 years and switched to NeoVim about a year of two ago. For me the main advantages over Vim are just the Lua scripting instead of Vimscript, its support for language servers, and better handling of terminals windows running inside Vim.

However, I do still run visual studio in parallel for debugging. It's basically essential when dealing with console game development.


I found DAP neat enough for interactive debugging (when logging is not enough). But I only used DAP under Neovim to debug Python.


I just let AI handle any and all debugging at this point, haven't had an issue where AI couldn't find out what the problem was, finding a solution on the other hand is a hit or miss still.


Can AI pause execution and step through the code line by line? Because that's what I think your parent comment is referring to.


AI can use gdb.


How do you achieve this behavior ? Sorry I haven't done researchs on it because so the answer might be super easy, but I'm curious what's your solution


I haven’t done it specifically but it shouldn’t be much different from other tools calling


yes. better than me actually.


I use neovim daily but am 100% sure I'm not even scratching the surface of its power. In fact I'm not even sure I'm using anything specific to the "neo" variant vs plain vim.

I can do simple search/replace, page up/down, jump to character or delete x words, but I feel like I'm missing a lot to really take advantage of it.

Is there a tutorial or guide people recommend to become more of a power user? The only plugin I have is the Markdown editor for instance.


I'd recommend checking out lazyvim, it comes with a bunch of very sensible plugins and you can read through the lazyvim docs (and then click through to individual plugin docs) to discover them and see which ones you want to use.


I recently switched to LazyVim and the default config in their tutorial included all the “extras”. It transformed vim into some kind of hallucinogenic kaleidoscope of an IDE with all sorts of telescoping overlays and pop-ups with a color scheme that fits well with an 8 year old girl’s princess themed birthday party. I actually screamed a little.

Not sensible. completely insane.


Not sure about the "tutorial", but I use lazyvim as base for LSPs, snacks, neo-tree and a theme matching the rest of my desktop and it seems to be fine?

nvim has a lot of "fun" plugins that you wouldn't actually use so I think you might have ran into that.


there’s the LazyVim distro and the lazy.nvim plugin on which it was built. the latter is a bit more sensible.



Just to add, there are so many hour long Neovim setup videos on youtube that will make your life easier


Honestly, same. I did naturally start to pick up things such as c(code actions) and some git related helpers. But <cnt><c/d/n/o/y/p> gets you 90% of the way there with / navigation.

Also just use the mouse! Lazyvim has great support for it.

<leader>SK is your friend as well.


Remember that `<leader>SK` does not show neovim built ins. Example ctrl-o which moves to older jumplist position is not show in it.

I'd also suggest kickstart.nvim over Lazyvim as its leaner with a primary file for configuration it is not lacking power.


Unfortunately kickstart.nvim is no longer actively maintained.


The repository still get updates, don't see any words to that end on front page. There is a new issue about discussion on what changes for Neovim 0.12 to consider...

Whats your source?


You _can_ just use a mouse, but I would not recommend it for someone who wants to learn to become a power user.

I feel like the habit I’ve benefited the most from on my neovim journey has been reaching for :h before doing any web search. Good completion in the command-line helps a lot there.


> Also just use the mouse! Lazyvim has great support for it.

My mileage was quite different: last time I tried, scrolling too fast with the mouse wheel consistently caused a segfault.


Drew Neil‘s books, Practical Vim and Modern Vim are excellent.


If you search up vim games you'll find some fun tutorials.


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 workflow.


As an aside, it would be straightforward to make vim/neovim the editor that opens when you double click a text file on the desktop.

This kind of setup is at its most powerful when you live on the command line though. For instance, you need to modify .py files across multiple projects that mention a certain variable, have a certain word in their name, and were modified within the last month.

That search is a bit easier in bash/zsh than it is in most IDEs and the strength of vim/neovim is the shell integration.


It's not my kind of workflow but you can download a graphical client like Neovide, which I think has options for opening directly from your file browser.

I typically have a terminal-heavy workflow so it's very rare that I'm browsing to files from within my desktop, but if I am using Dolphin to look for a file I have a "Open terminal here" shortcut and then I'll usually just run "nvim doc.md".

Why not give it a try? You'll likely find that there's an adjustment period and you can always switch back to your old editor if you don't like it. The beauty of it is that you can build it into whatever IDE you want instead of having useless features shoved into your IDE whether you use them or not.


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 switching. So muscle memory helps a lot. Just like you don’t think about each character when you write, I don’t really think about the shortcuts and commands I use.


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.


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,…


> like , being able to pop a document open in your editor from the desktop?

There's a hackish way to do it by watching for Neovim command line commands that start with "/Users/" (change it if you are on other OS).

Your coding agent can probably hack something up based on:

`//Hackish supports drag and drop files into Neovim by examining when command line starts with "/Users/".`


You're holding it wrong if you're dragging files around a desktop to open them.

Just use a fuzzy file finder within the terminal or within vim itself.


In Neovim, most non-toy language servers allow you to open the doc/definition in a popup/floating window, typically bound to `K`. Some language servers like rust-analyzer and gopls also support opening the docs in your browser.


lazyvim DOES have mouse and GUI-type support. This is a huge myth! I use mouse regulary in neovim and tmux.


What do you use for managing several different projects in nvim?


Sounds awesome. Can you tell us more... How do you ideally use/setup AI,tmux and nvim?


tmux+lazyvim with mouse enabled, tmux with continiuum/resurrect, rest I can't really tell you about other than telling AI exactly what I wanted and doing so until I felt productive again.

My setup looks something like this:

  |ai |nvim           |git view |
  |___|               |________ |
  |ai |               |terminal |
  |   |(proj selector)|         |
ai is an independent tmux window where I can shuffle between project groups.

for AI I found oh-my-pi from can1357 it's magical how good it is. It was a top rated post on HN awhile back.


Awesome! I'll give it a shot. Thank you!


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.


How many weird terminal bugs do you have in your setup? Eg one that annoys me the most is that pressing esc in insert mode often takes a few seconds to do its thing.


any chance you have a key sequence mapping that starts with esc? sounds like its waiting to see if you are gonna be pressing another key before timing out and do its thing


It happens randomly, which makes me think it's a bug.


Unlikely. Start with empty configuration, and try to reproduce first.


It’s not a bug. The wait times is because the terminal supports escapes codes (which start with an escape character). So most TUI (which put the terminal into a special mode) have a wait time to distinguish between the two (because for the terminal there’s no difference between keyboard events and the software UI). I think it’s configurable in both tmux and vim.


Never had that.


vi/vim has enabled that for 30+ years.


Use windows and leave kernel panics behind :)

i can tell you dont actually SSH often by tbe way. Also, tmux doesnt magically reduce resource requirements of your applications


What are you talking about, kernel panics are part of life with consumer hardware. They would happen even if it was windows?

You're right. I don't use SSH that often due to kubernetes, infact I only use ssh for connecting to my desktop to access my tmux sessions and it's great. I know where you're trying to go with this and it's simply not true.

Who said anything about tmux? We're talking about neovim which is extremely light weight and the LSP's don't sit around being active all the time. They have a set duration where they terminate when unused which is simply not possible in most IDE's (LSP based ones are OK, but have problems reconnecting).


> kernel panics are part of life with consumer hardware.

This isn't right. It was certainly true in the nineties, but I haven't seen one in years on Windows and I spend many hours a day in it both for work and play.


DDR5 where yields are pushed with module level ECC? Janky amd gpu drivers, "RGB" controller drivers misbehaving, some hardware that is just as bad as it was in the 90's since they all use driver sourcecode copied from the 90s.


you mentioned tmux. are you gaslighting me? lmao.

and kernel panics are exceedingly rare on windows. i havent BSOD'd in eons


Kernel panics are almost entirely about bad RAM on all systems today. But last time I was stuck on Windows, about 2017ish, I was suffering constantly from blue screens in a way that never triggered on linux.


yes I mentioned tmux as a project management/switcher tool what about it? (how good (nvim) is with tmux and the low low memory usage.

I haven't had a kernel panic once on reliable hardware. Linux is way more stable than windows device drivers and progressively less reliable graphics drivers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: