Live data from Hacker News

Neovim 0.5 is overpowering

crispgm.com

381–390 of 429 posts

Re: Neovim 0.5 is overpowering

#381

I'm most excited for the treesitter integration and its potential to amplify Vim's "killer feature": text editing as a language. Vim's editing language feels most powerful when I'm using its text objects: "ciw" means "change in word", "cis" means "change in sentence", and so on. But Vim's built-in text objects are not always a perfect match for the code you're editing. Suppose you want to change the first argument of…

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 ;)

Don't worry, you're not alone. 100% of the people I've ever saw using Vim / Neovim spend much longer "calculating" their next command than they would spend just doing in with CMD-D in VSCode.

It's frustrating to see. CMD-D in VSCode does 95% of what's needed, with no mental burden.

But hey, you can't "brag" that you "know VIM" if you use VSCode...

Re: Neovim 0.5 is overpowering

#382
post #52

Earlier quoted context omitted.

Vimscript is terrible though. I switched from Emacs to Vim (and later, neovim) last year and the shock of going from elisp to vimscript was intense. I even contributed some small patches to a couple of vim plugins which meant writing and debugging vimscript, I hated every second of it. I'm not a huge fan of Lua either mind you, but I'll take it any day of the week over vimscript.

> I'm not a huge fan of Lua either mind you If you liked emacs-lisp, perhaps you should try Fennel. It's a tiny Lisp that compiles to Lua with zero overhead. It's pretty dope.

Oh, that sounds interesting, thanks for the tip!

Re: Neovim 0.5 is overpowering

#383
post #276

Earlier quoted context omitted.

Whenever you say words “natural”, or “friendly” you actually mean “what I am used to”. As the saying goes “Basically, the only ‘intuitive’ interface is the nipple. After that, it's all learned.” (Usenet discussion about Apple Macintosh). So, no, I spent couple of years struggling with non-modal editors, where I had that feeling all the time “I have no idea how to do it effectively in this $EDITOR, while I know five k…

Irrelevant nit, but: > “Basically, the only ‘intuitive’ interface is the nipple. After that, it's all learned.” The nipple is not intuitive for everyone. One of our children struggled mightily with the nipple and we had a miserable two or three months of breastpumping and finger-feeding before he finally figured it out.

Yeah, just wait until he gets to VIM in a few years.

Re: Neovim 0.5 is overpowering

#384
post #276

Earlier quoted context omitted.

Whenever you say words “natural”, or “friendly” you actually mean “what I am used to”. As the saying goes “Basically, the only ‘intuitive’ interface is the nipple. After that, it's all learned.” (Usenet discussion about Apple Macintosh). So, no, I spent couple of years struggling with non-modal editors, where I had that feeling all the time “I have no idea how to do it effectively in this $EDITOR, while I know five k…

Irrelevant nit, but: > “Basically, the only ‘intuitive’ interface is the nipple. After that, it's all learned.” The nipple is not intuitive for everyone. One of our children struggled mightily with the nipple and we had a miserable two or three months of breastpumping and finger-feeding before he finally figured it out.

He later corrected it by saying:

> There is no intuitive interface, not even the nipple. It's all learned.

Re: Neovim 0.5 is overpowering

#385

Earlier quoted context omitted.

This x |> h |> g |> f syntax is Elixir (and F# perhaps? and surely other langs). In Haskell this is written x & h & g & f And in shell script, this is written echo x | h | g | f This operator is sometimes called the pipeline operator Anyway, here is some ghci session exemplifying the usage of the & operator $ ghci λ import Data.Function((&)) λ a f g h x = x & h & g & f λ b f g h x = (f . g . h) x λ c = f g h x = f (g…

to be honest, idiomatic code in haskell-land tends to be written right-to-left and not left-to-right, so you'd usually write it with the ($) and (.) operators. I personally have gotten used to reading it right to left more, as have probably most people who use haskell extensively. And I think it's only fair that haskell chose a 1 character operator: composing functions and applying them to arguments is the main way t…

I recently started using (&) a lot (e.g. `something arg1 arg2 & liftIO`) and frankly I think it's fantastic for readability, especially with adaptors like `liftIO` or `void` in `do` blocks. The relevant information is up front in a consistent position in the block; the adaptor is only even noticeable when I actually read the line - rather than being something I need to semi-consciously ignore. I also sometimes use it for chains of pure function application when the alternative is to read bottom-to-top or use where/let bindings with arbitrary names.

`import "flow" Flow` gives you (|>) = ($), () (by analogy). I slightly wish it were part of base - the symbols are much more intuitive, and I think that's important for increasing adoption - but I tend not to use it because it's non-standard. Most potential/plausible Haskell users, after all, haven't used Haskell at all, let alone extensively. Such people need to be taken seriously in decision making processes even though they almost necessarily have no voice.

I don't think the number of characters is at all relevant to the decision though: being non-surprising and understandable are far more important than using one vs two chars which in this case pull in both directions and I reckon the balance lies with sticking to the standard.

Re: Neovim 0.5 is overpowering

#386
post #298

Earlier quoted context omitted.

I didn't go that far, but for small movements I use arrow keys. hjkl don't make any sense to me and I'm not keen on using them just because someone had that keyboard layout in 1978.

They make sense because they are directly under your fingers, so you don't have to move them all the way over to the arrow keys and back just to move around. jkl; would make more sense, that's the only oddity.

…Assuming you're using QWERTY. They aren't in great positions for other layouts.

Re: Neovim 0.5 is overpowering

#387

Earlier quoted context omitted.

The way vim works is actually the opposite of what your brain wants, this is one of the reasons why learning vim tricks is hard. The vim model is "action-object" (eg dw, delete word). A more natural, friendly and interactive model is the opposite, "object-action": first you select the text, your editor highlights the text, then you apply actions to the selection, one by one, and see what happens after each one. Becau…

Are you making a general claim that the brain prefers object-action syntax vs action-object, or just in text editor commands?

I think the only general claim that could be made is that the brain prefers to be certain of what's going to happen/what did happen. To get that you either need to have a good feel for where a motion is going to end up (which is harder the more inexperienced you are, and the more complex/farther the motion), or to get feedback.

Personally, I also struggle with a relatively high rate of accidental (or mis-registered) key presses, or being in the wrong mode, which means that even if I have high confidence in constructing the right command in my head, my confidence in the right command being executed is significantly lower, and direct, always-on feedback thus feels enormously helpful to me.

Re: Neovim 0.5 is overpowering

#388

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 ;)

The way vim works is actually the opposite of what your brain wants, this is one of the reasons why learning vim tricks is hard. The vim model is "action-object" (eg dw, delete word). A more natural, friendly and interactive model is the opposite, "object-action": first you select the text, your editor highlights the text, then you apply actions to the selection, one by one, and see what happens after each one. Becau…

I suspect your hunch about object-action way brains work is very narrow and will not hold if extrapolated outside the western culture. My suspicion is based on a belief in [Sapi-Whorf hypothesis](https://en.wikipedia.org/wiki/Linguistic_relativity#:~:text=....). The need to reach of the object first is a very English specific language constraint afaik.

Re: Neovim 0.5 is overpowering

#389
post #280

I'm a long time (20+ years) vim user, and neovim doesn't fit my use case. I've tried it, most recently today, to have a look at LSP and treesitter. Treesitter added different syntax colors, but the result wasn't necessarily better than vanilla vim. More like an overly decorated christmas tree. LSP and other "make it into an IDE" I usually turn off after a few minutes, it's more of a hindrance than a help. I mainly co…

> they removed gvim (which is what I use in most cases). There is no comparable third party GUI like gvim available. They're all either abandoned, unstable or simply very different with lots of bling and gimmicks. I'm not sure I understand what you're missing from neovim-qt? https://github.com/equalsraf/neovim-qt I suppose maybe we have diffuse cases - but I'm fairly certain I'm running qt neovim, and not nvim in a t…

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 me to look at this again.

However, on running it, the window seemed very wide, so one of the first things I tried was `:set columns=80` — and nothing happened. Checking :h 'co`, it looks like it's supposed to work.

Ah, and it seems the (released version of) QT gui doesn't support ligature fonts yet. The FiraCode website says it works with NeoVim-gtk: https://github.com/tonsky/FiraCode#user-content-editor-compa...

Maybe I'll give that another go ...

Re: Neovim 0.5 is overpowering

#390
post #380

Earlier quoted context omitted.

I recently gained a liking to search result highlighting, it's much more useful than I originally thought. The problem is not the highlighting itself but its persistence. I added a few autocmds to automatically hide it in certain events and a manual shortcut. Works better for me now, though it is annoying that `:noh` has some weird special status that makes it nonfunctional in autocmd.

I evaluated few plugins around this and this one I liked the most: https://github.com/romainl/vim-cool

I tend to avoid plugins for things that I can just do myself with a few keybindings or autocmds. I like that aspect of Vim (and Emacs) where the user is less reliant on plugins because there isn't really a clear, fixed boundary between configuration, scripting and external extensions. Though it comes with downsides (e.g. when plugin developers make the questionable decision of overriding user configuration).
Post reply on HN