Live data from Hacker News

Neovim 0.5 is overpowering

crispgm.com

401–410 of 429 posts

Re: Neovim 0.5 is overpowering

#401

Earlier quoted context omitted.

Yeah, just recently I had to edit text like this 'name1', 'name2', 'name3', to: 'name1': Enum.Name1, 'name2': Enum.Name2, 'name3': Enum.Name3, by the time I figured out a sequence of keyboard commands I'm pretty sure I could have multicursored it pretty easily, go to name1, create 2 cursors, select word & copy, start typing : Enum., paste selected word, select word, capitalize, type , In vim it was something like qdy…

Or, you could have hit qt, recorded your commands for the first change, and then replicated it for every other line with a simple @t, instead of redoing all the changes each time. You don't have to learn command. You simply need to know how to edit with VIM. And multi cursors only work for tabular data. The macro recordings can work for the entire document where you call a macro on a word/regex you searched for, for…

You probably are familiar, but for some newer folks: I almost always add a "go to beginning of next line" as the end of the macro so that I can e.g. 10@t to repeat it 10 times. Makes it much quicker than @t on each line once you have more than a few.

Re: Neovim 0.5 is overpowering

#402

Earlier quoted context omitted.

Thanks. I'd previously tried and failed a couple of times to get a NeoVim gui installed, mainly because I wanted to try one of those ligature fonts that display -> as → and the like. There seemed to be a few different options, in various states of being abandoned, or unpackaged, or needing libraries not in my OS, or ... Turns out now all that's needed for Ubuntu is sudo apt install neovim-qt. Thank you for prompting…

Does your language not support Unicode?

Some of my stuff is in Raku, which indeed supports Unicode operators. But other coding isn't, and it'd be nice to use ligature fonts for those.

Re: Neovim 0.5 is overpowering

#403

Earlier quoted context omitted.

Do you find your brain can actually work that way? My issue with all of these relative jump points, repeat this N times, etc of VIM is by the time I’ve calculated in my mind what the command should be I’d have already done it with just standard navigation/mark/yank/repeat. But perhaps you have galaxy brain ;)

Like vim in general it’s not natural, but with practice you slowly start to pick up muscle memory around it. I try to shoot for easy-to-eyeball tricks, a good one is jumping to the place you want to edit with f + the first char. If there’s duplicates in between, you can use ; to go to the next occurrence of the char on that line. There’s plenty of other tricks like that that, in aggregate, makes it feel like you’re t…

Exactly. The best approach is layering, in my opinion. Learn the basics, maybe a couple of tricks, and then deliberately add one more thing to your toolbox which would improve your productivity. Then incorporate that new trick into your flow until it sticks, then repeat. Eventually your toolbox is getting full and you are able to recall all the things naturally.

Re: Neovim 0.5 is overpowering

#404

Earlier quoted context omitted.

Yeah, just recently I had to edit text like this 'name1', 'name2', 'name3', to: 'name1': Enum.Name1, 'name2': Enum.Name2, 'name3': Enum.Name3, by the time I figured out a sequence of keyboard commands I'm pretty sure I could have multicursored it pretty easily, go to name1, create 2 cursors, select word & copy, start typing : Enum., paste selected word, select word, capitalize, type , In vim it was something like qdy…

Column editing in vim: https://youtu.be/dYDu9Hrg7yM?t=639 I saw a colleague doing the same thing (turn column of #defines into structs in an array) with multiple cursors in an IDE, took him much longer. I paused to take a drag from my smoke while doing that.

Sorry but column editing is a stripped-down multicursor mode. I use vscode-vim (so, VSCode with Vim mode) and never use column editing because the IDE multicursor is much more powerful. Without being any sort of editing wizard, I'm finding your video example slow and mildly painful to watch

Re: Neovim 0.5 is overpowering

#405
post #393
post #373

Earlier quoted context omitted.

In English, sure. Not in Hindi for example (मैं खाना खाता हूँ - 'I food eat') or in .. object-oriented methods of many programming languages. I don't think there's anything special about that mapping, whichever way around. I'm not inclined to think I'd perceive things or act any differently if my main way of describing things (English) had a different grammar - a rose would smell just as sweet. I can see some value,…

Some languages use both orders, and the difference is more of a stylistic choice.

Latin has an extremely flexible word order (some of which Old English had too) which allows all kinds of fun stuff for style and communicating status/education. Japanese with its particle system also allows some good flexibility.

Re: Neovim 0.5 is overpowering

#406

I see a lot of hate on Lua here. Anecdotal but I never wrote any plugins in vimscript. Since moving to Lua a week ago i’ve already written one, and will continue to where I find a use case. Vimscript sucks, using Lua will make it easier for people to contribute I think.

I agree that vim script needs replacement, but I don't know that Lua was the correct answer.

It's not a super-popular language and makes some things harder than necessary. Base 1 arrays means you are almost certain to bake in bugs accidentally. Meta tables are even worse though. They result in many subtly different object systems. Maybe that's not as bad in a unified project, but it's the path to a fractured ecosystem. The builtin string library is very barebones which isn't a great place to be in a text editor. Finally, the "regex" match function is hyper limited.

I'd argue that either Python or JavaScript would be better.

Re: Neovim 0.5 is overpowering

#407
post #393
post #373

Earlier quoted context omitted.

In English, sure. Not in Hindi for example (मैं खाना खाता हूँ - 'I food eat') or in .. object-oriented methods of many programming languages. I don't think there's anything special about that mapping, whichever way around. I'm not inclined to think I'd perceive things or act any differently if my main way of describing things (English) had a different grammar - a rose would smell just as sweet. I can see some value,…

Some languages use both orders, and the difference is more of a stylistic choice.

Indeed, in Spanish we say "lava la ropa" do the laundry. I am pretty sure that is what my brain wants, action object. Once in object-oriented training I was told that In Cantonese the person does not act on objects but the objects act on themselves: "The deck of cards shuffles itself"

Re: Neovim 0.5 is overpowering

#408
post #34
post #15

I use nvim in the terminal and gvim/macvim on the desktop. I don't like how the nvim community seems to be throwing themselves wholeheartedly into lua and lua-only plugins (vimscript plugins are better because they work with both vim and neovim). Switching to init.lua also means losing all compatibility with vim, and I cannot fathom why people would want to do that considering that there is nothing that init.vim cann…

> vimscript plugins are better because they work with both vim and neovim I think you mean "vimscript plugins are better for plugin adoption because they work with both vim and neovim". From the language-design, performance, documentation, robustness/general codebase quality, and total number of users perspectives, Lua is overwhelmingly better than vimscript. > I cannot fathom why people would want to do that conside…

> From the language-design, performance, documentation, robustness/general codebase quality, and total number of users perspectives, Lua is overwhelmingly better than vimscript.

Even if ahead of Vimscript; from the language-design, performance, documentation and total number of users perspectives Lua sucks very very much.

Re: Neovim 0.5 is overpowering

#409

Earlier quoted context omitted.

> I am just not in the club of the people who'll use 25% of their workday chasing an Elisp error Yes, experienced Emacs users do write some emacs-lisp all the time. But despite the popular belief, it's not about chasing and fixing Elisp errors. I, for example, write emacs-lisp functions just because I can. Here are some typical examples: - I have a GitHub link to an issue or a pull-request, I want to download the des…

I am not here to shit on Emacs -- I recognize that I am not its audience. Took me a long time because I was in denial but eventually I figured it out. But I get Elisp warnings and errors every day. And mind you, I did abandon my monstrous init file a year ago and just yielded to Spacemacs with very minimal changes like font, cursor customization et. al. -- basically just 7-8 of these. It has a ton of stuff in it thou…

> Spacemacs isn't a lightweight Emacs

No, it's not. Many people make a mistake, thinking that Doom, Prelude, or Spacemacs are ready-to-use, out-of-the-box solutions. They are more like collections of recipes. You have to judiciously remove things. You need to know how to use the built-in profiler.

> and that I will be giving up on it because of that

And that's okay. I myself abandoned Emacs and moved back to other things several times, until I finally learned how to make it work for me.

Re: Neovim 0.5 is overpowering

#410
post #18
post #15

I use nvim in the terminal and gvim/macvim on the desktop. I don't like how the nvim community seems to be throwing themselves wholeheartedly into lua and lua-only plugins (vimscript plugins are better because they work with both vim and neovim). Switching to init.lua also means losing all compatibility with vim, and I cannot fathom why people would want to do that considering that there is nothing that init.vim cann…

The thing is, Vimscript sucks. Using a more mainstream language would be great for a modern advanced editor. Vim has a ton of Vimscript plugins but I wonder how long it will take the Neovim community to replicate most of their functionality in Lua. I'd guess that not that long.

> The thing is, Vimscript sucks. Using a more mainstream language would be great for a modern advanced editor.

Lua sucks, too, and it's hardly mainstream.

Post reply on HN