Live data from Hacker News

Vim After 15 Years (2017)

blog.langworth.com

101–110 of 116 posts

Re: Vim After 15 Years (2017)

#102

Earlier quoted context omitted.

I also use kitty + neovim. I highly agree.

I've been a heavy vim user for I don't even know how long. What does neovim get me over vim? Looking at the charter page on the website, the only thing that really stands out to me is Lua. "Deliver a first-class Lua/LuaJIT scripting alternative to Vimscript." The rest seem fine but not really a reason to switch, and I don't know Lua so I'm not sure that's a reason either. Is this the main reason? Are there other good…

Lua is the only difference but it makes all the difference. From my understanding, Lua is nicer than Vimscript, this means more people will create more interesting and better Lua plugins, that can only be used in neovim. LuaJIT is also fast.

Re: Vim After 15 Years (2017)

#103
post #29

Author here. Many will be disappointed to know that I've been using VS Code almost exclusively since 2019 (with the Vim plugin of course). I've been meaning to write a follow-up article, but unfortunately writing is low on the priority list. The main reason is that these days, when I _am_ coding, I mostly write TypeScript and React on my local machine (not much SSH these days), and VS Code Just Works™. I tried twice…

> I've been using VS Code almost exclusively since 2019 (with the Vim plugin of course).

I think it's more reasonable to use VSCode rather than trying to turn Vim into a monster it wasn't supposed to be. I see Vim a simple modal editor, which can be integrated in other tools such as IDEs.

Re: Vim After 15 Years (2017)

#104

Earlier quoted context omitted.

I've used vim for a while now and using it isn't a point of pride, it's more that whenever I try an IDE I wonder how anybody could be productive using it. I've rarely had a problem with search, I can type `:grep [some regex]` and I'm quickly shown all matches for that regex in the entire project. I admit I'm not sure how I would do a more complicated query, but this is almost always enough, what kinds of queries do y…

On search: IDEA out of the box has: - fuzzy text search across your entire codebase. Supports regexes, when you need them - fuzzy text search for symbols only (e.g. when you only need to search for method names etc.). Supports regexes, when you need them - fuzzy text search for file names - Ctrl/Cmd + click, or Ctrl/Cmd + B on any symbol, and you'll get a list of all the places where this symbol is used (e.g. a metho…

IDK grep and find work fine for me here.

> Edit: esp. with search almost every year there's a new tool that you absolutely must use because it's better than the previous tool. ripgrep, ag, telescope, treesitter, semgrep, use them all!

Aren't you also doing this? "Use IDEA, it's great for searching!".

I think there's something to be said for aesthetics here, where if you like typing you're gonna be into the grep/ripgrep/find aesthetic, and if you like GUIs you're gonna be into IDEs. People trying to assert some kind of objective superiority of their tools over others' is kind of tedious. Use what you want.

Re: Vim After 15 Years (2017)

#105
post #9

It's alway pretty fascinating to me that people can actually be productive without an IDE. I've tried several times Vim and I just don't get it how you can live without certain functionalities, I'm sure that with enough tinkering you can get pretty close but, for example, search seems to always be kind of a pain in the ass for the complex queries with regex through many files and stuff like that, specially the presen…

From my perspective, vim is just a tool that I picked up in college, back in the bad old days (early 00's) where good IDE's were paid and anything free was largely terrible. Sure IDE's are great, I love stepping through code, it really helps when you're in deep and are having problems reasoning about the state of your program. That said, every shop I've worked in used a different IDE. Possibly one picked out by some…

I suppose I agree with this, I try not to obsess over the tools too much. It makes sense to have a standard IDE and standard tools in a company. However there's always a possibility to improve. One can suggest new tools to a small circle of coworkers, or just start trying out new tools on one's own. In one workplace that has a huge Windows codebase I compile and debug from within Visual Studio, and edit either in Visual Studio or sometimes vim. When I get the chance to do explorative work on a rather standalone project I gravitate towards vim, even to printf debugging, even though Visual Studio is available. I don't know why this is, old habits, or is it genuinely more economic on some axis - for new projects at least?

Re: Vim After 15 Years (2017)

#106
post #24

Earlier quoted context omitted.

Treesitter is amazing. We have a bunch of sql strings in python and I was able to drop a couple of lines into my injections.scm to isolate them and get perfect sql highlighting within my python code.

I didn't even know you could do that, this is why I come to this site.

If anyone is interested in how it works, here's the whole thing (I'm looking for strings inside a call to a text function, which is how you wrap sql for sqlalchemy).

    # queries/python/injections.scm
    ; inherits: python
    
    ((call
      function: (identifier) @_func
      arguments: (argument_list (string) @sql))
    (#eq? @_func "text"))
There's a little nuance here where the thing that treesitter parses includes the """ (or ") at the start / end but because it can recovery from errors I'm not bothering with wrangling the offsets.

Re: Vim After 15 Years (2017)

#107
post #9

It's alway pretty fascinating to me that people can actually be productive without an IDE. I've tried several times Vim and I just don't get it how you can live without certain functionalities, I'm sure that with enough tinkering you can get pretty close but, for example, search seems to always be kind of a pain in the ass for the complex queries with regex through many files and stuff like that, specially the presen…

I was contemplating the same thing today as I was knee deep in refactoring a piece of code - I use IntelliJ and ideavim, which I find great because it also implements (emulates?) a small subset of vim plugins. I was able to finish the fairly complex refactoring in half an hour, without taking my hands off the keyboard by using a fairly strong combination of vim and IDE features. This is what works for me. I use an In…

What is with this obsession of never taking the hands of the keyboard? I've seen it so many times and it makes no sense to me. I don't find myself limited by the speed of typing but by the speed of thinking.

Re: Vim After 15 Years (2017)

#108

Earlier quoted context omitted.

I've been a heavy vim user for I don't even know how long. What does neovim get me over vim? Looking at the charter page on the website, the only thing that really stands out to me is Lua. "Deliver a first-class Lua/LuaJIT scripting alternative to Vimscript." The rest seem fine but not really a reason to switch, and I don't know Lua so I'm not sure that's a reason either. Is this the main reason? Are there other good…

Lua is the only difference but it makes all the difference. From my understanding, Lua is nicer than Vimscript, this means more people will create more interesting and better Lua plugins, that can only be used in neovim. LuaJIT is also fast.

vim does support python plugins, not just vimscript...

Re: Vim After 15 Years (2017)

#109
post #57
post #54

Earlier quoted context omitted.

So Emacs is going to be your next move? /s

I used Emacs from 2010-2012 just to know what I was missing. I liked using it and tinkering with it, but when it came to being productive, all of the tooling felt out of date and hard to use in comparison to Vim. I said then that if someone would make a text editor and IDE that used JavaScript from the ground up instead of elisp, that it would dominate, and that's what seems to have happened with VS Code.

I respect your settlement on VS Code. What works, works. But 2010-2012 was seemingly ages ago compared to how well the Emacs ecosystem has modernized in such a short, recent timespan. You may find it appealing again, if you're ever interested. With the work done on speeding it up via native compilation, I don't think I'll ever find a better editor for myself, personally.

Re: Vim After 15 Years (2017)

#110
post #9

It's alway pretty fascinating to me that people can actually be productive without an IDE. I've tried several times Vim and I just don't get it how you can live without certain functionalities, I'm sure that with enough tinkering you can get pretty close but, for example, search seems to always be kind of a pain in the ass for the complex queries with regex through many files and stuff like that, specially the presen…

Just my 2 cents on this > I don't quite remember something and having the internal file history with a diff readily available. You're already in a terminal, git is just one command away > Some of the click and find implementation/usages never seems to quite there to me. This really depends on the language you are working in, but generally vim's gd (and plugins that augment it) enough most of the time, otherwise grep/…

"When I type the characters actually appear on the screen as I type them"

Great quote. Perhaps one of the best arguments for using Vim

Post reply on HN