Live data from Hacker News

Notes on switching to Helix from Vim

jvns.ca

151–160 of 242 posts

Re: Notes on switching to Helix from Vim

#151
post #150

Earlier quoted context omitted.

Neovim with lazy.nvim has that by default (delay included).

I'm not Neovim person, but would you happen to know what plugin provides that feature?

Sorry I'm exhausted and lazy.nvim is the package manager, but I meant lazyvim which is the distribution. Within this distribution I'm pretty sure it's which-key that provides a popup. If I type it pops with suggestion (and a little icon in front of each indicating if the next key has sub-commands or not).

Re: Notes on switching to Helix from Vim

#152
post #61

I cannot express how liberating it feels to opt out of "advanced" editor tools like lsp. I program in neovim with no plugins, no syntax highlighting and no autocomplete of any kind. There is a discipline that this imposes that I believe leads to better quality programs. It's not for everyone I suppose, but I really recommend trying it.

I agree and don’t use any of that stuff—-except syntax highlighting. Why wouldn’t you? Color is a whole extra dimension it adds to the code that lets the eye notice errors more quickly and jump around faster.

Re: Notes on switching to Helix from Vim

#153

Earlier quoted context omitted.

I can see no plugins, I can even see no autocomplete but no syntax highlighting is just making things difficult for the sake of it

To each their own. I quit using syntax highlighting about 10 years ago and won't ever go back (been programming for 25 years, vim/neovim user for 24 years). I just like it better, it works for me. It definitely does not make things "difficult for the sake of it" (for me ). There are dozens of us! :) (As to the rest: I use a pretty minimal set of plugins and I use the built in nvim C-o/C-p or C-x C-o/p "dumb" autocomp…

How is no syntax highlighting better, specifically?

Re: Notes on switching to Helix from Vim

#154
post #150

Earlier quoted context omitted.

I'm not Neovim person, but would you happen to know what plugin provides that feature?

Sorry I'm exhausted and lazy.nvim is the package manager, but I meant lazyvim which is the distribution. Within this distribution I'm pretty sure it's which-key that provides a popup. If I type it pops with suggestion (and a little icon in front of each indicating if the next key has sub-commands or not).

folke/which-key.nvim: https://github.com/folke/which-key.nvim :

> Customizable Layouts: choose from classic, modern, and helix presets or customize the window.

LazyVim keymaps: https://www.lazyvim.org/keymaps

Re: Notes on switching to Helix from Vim

#155
used vim for ten years now. I have wanted to try this out but stuck in my ways with vim. To me one of the great selling points of vim (I use strictly in terminal, I didnt even know there was a gui) is that no matter what machine I am on, I basically always have my code editor available to me. my .vimrc is about 10 lines, growing at a pace of maybe 1 line a year, and it’s in my head. If I need to switch machines, no big deal, just install my favorite flavor of vim and shell and I’m good to go almost instantly, vs the typical fuss a lot of other editors have to feel “just right.” vim out of the box is really good without much fuss, providing you have got past the learning curve - which admittedly, is steep.

Re: Notes on switching to Helix from Vim

#156

Earlier quoted context omitted.

I think you completely missed the context for the configuration issues in vim: I’ve been trying to get a working language server setup (so I can do things like “go to definition”) and getting a setup that feels good in Vim or Neovim just felt like too much work.

It might have been a bit harder in the past, but with recent versions of neovim (>=0.11) it's less than 20 lines of configuration. I have quite a few keybindings to jump back and forth through errors and the default keybidings already include things like renaming, go to definition or listing references. I'd be more than happy to help you configuring it to your needs.

This. Now that LSPs are natively understood by neovim it's a very painless process. Especially if using mason to fetch the language servers.

Re: Notes on switching to Helix from Vim

#157
post #84

The bloat of the neovim distributions are real and what I would suggest for anyone who is a long time vim user is to check out kickstart. https://github.com/nvim-lua/kickstart.nvim , specifically the modular fork https://github.com/dam9000/kickstart-modular.nvim which will give you a great (minimal) starting point

Heh the thing I like about kickstart is everything is in one file, though it is a bit unwieldy, so I surrounded most bits around fold markers to make it a bit more manageable.

Re: Notes on switching to Helix from Vim

#158

used vim for ten years now. I have wanted to try this out but stuck in my ways with vim. To me one of the great selling points of vim (I use strictly in terminal, I didnt even know there was a gui) is that no matter what machine I am on, I basically always have my code editor available to me. my .vimrc is about 10 lines, growing at a pace of maybe 1 line a year, and it’s in my head. If I need to switch machines, no b…

Out of curiosity, what in a broad sense is configured in those 10 lines? (For context: I'm a Helix user trying out terminal-based vim at the moment and I'd like to know what the most important tweaks are.)

Re: Notes on switching to Helix from Vim

#159
post #48

> crashes: every week or so there’s a segfault and the editor crashes. ... This doesn’t bother me that much though, I can just reopen it. Strange approach to data loss, since it doesn't have persistent undo, you can't just reopen it to the same editing state? > After using Vim/Neovim for 20 years, I’ve tried both “build my own custom configuration from scratch” and “use someone else’s pre-buld configuration system” a…

I think you completely missed the context for the configuration issues in vim: I’ve been trying to get a working language server setup (so I can do things like “go to definition”) and getting a setup that feels good in Vim or Neovim just felt like too much work.

Getting LSP to work on recent versions of Neovim is one plugin + one line of configuration. Here are the steps for enabling clangd:

1. Install nvim-lspconfig plugin

2. Add `vim.lsp.enable("clangd")` to init.lua

You can even enable LSPs on a per-project basis by taking advantage of the revamped exrc feature:

1. Add `vim.opt.exrc = true` to init.lua

2. Add `vim.lsp.enable("clangd")` to $projectdir/.nvim.lua

Re: Notes on switching to Helix from Vim

#160
I feel like I am not asking THAT MUCH from my neovim setup, but it is so complicated. My collection of vim config is about 1000 lines, that's insane, but when I try to trim it, everything seems required.

My requirements:

- language support (syntax, formatting)

- lsp (I want the goto definition)

- file browser

- quick jump (fzf...)

- a little bit of eye candy, nice fonts and a few icons to make things clear

- auto reload if file changed externally

- splits I can manage with the keyboard

- persistent undo

- in terminal or with excellent SSH remote editing

I would love to have an editor with better defaults. I don't mind learning something good and robust if it will serve me for years.

Post reply on HN