Live data from Hacker News

Learn Vim (2021)

github.com

21–30 of 215 posts

Re: Learn Vim (2021)

#21
post #3

I love Vim, it's just a shame it takes 200 years to setup properly.

I'd honestly point folks towards Helix[0] these days if they don't already have something keeping them on neovim/vim. There's very little in the ways of needing to configure Helix; it has built-in most functionality that you'd find with batteries-included vim "distributions" and it works out of the box with the installed LSP servers on your system. [0]: https://github.com/helix-editor/helix

I've been using helix the last week or so. I can confirm everything "just works". My config file is not a turing-complete nightmare, it's literally 10 lines and took about 15 minutes to set up, most of that being personal preference on UI. Great program.

I've tried vim-as-IDE many times and personally I've found that I just don't have the patience/discipline to get it all set up and not have it become a huge time sink. I end up getting frustrated and start up VS code and what do you know, everything works absolutely perfectly with zero config. So why bother. New programming language? It literally pops up telling me what extension to install and < 5 seconds later it's working.

Re: Learn Vim (2021)

#23
I've re-built my neovim config like 3 times this year as I have played with several 'distributions' and styles. SpaceVim, LunarVim, AstroVim, and NVChad to name a few.

This last weekend I gave LazyVim a try and it is by far the most sane config setup I have used and I will now be sticking with it.

There is a starter repo where you clone it, delete the .git directory and start customizing.

https://github.com/LazyVim/LazyVim My config is here, feel free to copy/steal it. https://github.com/curtbushko/nvim

Re: Learn Vim (2021)

#24

I defaulted to Nano when I picked up linux, and that unfortunate choice has bitten me in the butt.

Having only used Nano since picking up Linux 2 years ago, I’m not sure what I’m missing. Can you make a case for me to learn Vim?

Kind of hard without knowing what you do and what your constraints are but at least for me vim is more widely available on the tools I use. I use neovim, but I also need to use Android studio and xcode sometimes, and there is a vim mode for each of those. So basically if you get used to it, it's a standard way to interact with several editors. Also it's just more fun and fluid to use for me but that's a matter of taste.

Re: Learn Vim (2021)

#25
post #3

I love Vim, it's just a shame it takes 200 years to setup properly.

Setup how? I've used vi/vim daily as my main editor for the past 35 years or so, over that time I doubt I've put more than 20 total hours into its setup. I've been using some evolution of the same .vimrc for decades and it's only accumulated a couple dozen lines. The longest setup task I can remember was a few years ago getting MacVim to launch with one window per folder (with files as tabs, in most cases that equate…

Personally for me the setup only gets annoying when you want IDE-like features: text completion, treesitter syntax highlighting, go to definitions, ...

Re: Learn Vim (2021)

#26
post #12

I defaulted to Nano when I picked up linux, and that unfortunate choice has bitten me in the butt.

I learned vim when I picked up linux, now I work at a company with a customized emacs tool we have to use. Doh it never ends...

If you develop RSI from emacs, you could have the employer make reasonable accommodations, i.e. let you use Vim :)

Re: Learn Vim (2021)

#27

Earlier quoted context omitted.

Having only used Nano since picking up Linux 2 years ago, I’m not sure what I’m missing. Can you make a case for me to learn Vim?

> Can you make a case for me to learn Vim? If you're coming from nano, I'd point to: 1) UI improvements like better syntax highlighting, split windows and tabs, and mouse support. 2) A cohesive language of key bindings that allows you to easily construct and perform commands like "delete everything from the cursor up to the next quotation mark" or "lower-case this paragraph". 3) A huge library of scripts and extensio…

Usually when nano is mentioned, it’s not a full development context, but instead e.g. crafting a systemd service file or editing crontab on a remote server. Do you really pull extensions and use mouse there? I think there’s nothing important that vim could add for gp, realistically.

Speaking as a life-long vim user.

Re: Learn Vim (2021)

#28
post #23

I've re-built my neovim config like 3 times this year as I have played with several 'distributions' and styles. SpaceVim, LunarVim, AstroVim, and NVChad to name a few. This last weekend I gave LazyVim a try and it is by far the most sane config setup I have used and I will now be sticking with it. There is a starter repo where you clone it, delete the .git directory and start customizing. https://github.com/LazyVim/L…

https://github.com/helix-editor/helix is the answer mate

Re: Learn Vim (2021)

#29
post #25

Earlier quoted context omitted.

Setup how? I've used vi/vim daily as my main editor for the past 35 years or so, over that time I doubt I've put more than 20 total hours into its setup. I've been using some evolution of the same .vimrc for decades and it's only accumulated a couple dozen lines. The longest setup task I can remember was a few years ago getting MacVim to launch with one window per folder (with files as tabs, in most cases that equate…

Personally for me the setup only gets annoying when you want IDE-like features: text completion, treesitter syntax highlighting, go to definitions, ...

no thanks, I'll go with tests.

jvm language goes to the IDE. Others can use vim.

Re: Learn Vim (2021)

#30

I defaulted to Nano when I picked up linux, and that unfortunate choice has bitten me in the butt.

Having only used Nano since picking up Linux 2 years ago, I’m not sure what I’m missing. Can you make a case for me to learn Vim?

- Fuzzy file search - I can't find a way to do this in nano? Where you can search a whole directory by name for the file you want to open. This is very useful in larger projects when you need to jump about a lot.

- LSP and all its uses - jump to definition is a big one.

- Window management - while you can use a multiplexer, using one session allows copy/paste to work, saves your file/search/command history, etc.

- While often overstated, it is undeniably more efficient... once you've learnt it.

However, if you are not doing programming, but are just editing e.g. Linux config files, then I would probably stick to nano (in fact, I usually use nano for these jobs, since getting my neovim config to work when running as sudo failed).

Post reply on HN