Live data from Hacker News

Neovim 0.5 is overpowering

crispgm.com

341–350 of 429 posts

Re: Neovim 0.5 is overpowering

#341

Earlier quoted context omitted.

Emacs lisp is not a bad language, but it's also not the reason for the existence of Emacs. It is the other way around: it was Emacs that created Emacs lisp. Initially, emacs was created on top of TECO, arguably the worst, most difficult programmable editor ever created. TECO language was so bad that they decided to switch. But emacs, the editor, was successful even running on top of a terrible language that nobody li…

> Emacs lisp is not a bad language, but it's also not the reason for the existence of Emacs Early Emacs and the modern GNU/Emacs I think, are two distinct worlds. I believe Lisp has shaped Emacs into its modern form. I just can't imagine the possibility of building something like Org-mode, with the same level of extensibility and flexibility in any other language that is not a Lisp. I bet if you ask any serious Emacs…

Funny, because Magit has been ported to Vim, I use it daily.

Re: Neovim 0.5 is overpowering

#342
post #221

Earlier quoted context omitted.

Exactly. They all emulate up to a point, and that point seems different with every emulator. Then slipping out of vi mode to do something specific to that editor/environment ruins the flow.

Although the emulations are getting really good. For instance this [0] VSCode plugin isn't even an emulation. It embed neovim into VSC, even loads your init.vim file. Snappy too. [0] https://github.com/asvetliakov/vscode-neovim

I've used it quite a bit but I've had it desync from the server state somehow on multiple occasions making the experience not all that pleasant.

Re: Neovim 0.5 is overpowering

#343
post #309

Earlier quoted context omitted.

It is pretty common nowadays in functional programming languages to find operators which reverse the order of application or composition, so rather than writing f(g(h(x))) one can instead write “x |> h |> g |> f”. This style is quite popular, which leads me to believe that many people prefer object-action over action-object in same way. (Although perhaps this is more a critique of action-object-object vs object-actio…

While you didn't refer to any explicit programming language (so your example is correct by definition), I think you may have mixed up something. The order is reversed, but typically not in the way you describe. For your example of f(g(h(x))), you would write (f . g . h) x in Haskell. So for this particular example, the syntactical order is not reversed. However, you could say the natural order of reading is reversed:…

I'm assuming they were talking about Elixir, which uses that syntax to pipe the result of the left side into the first argument of the function on the right side. The transformation was correct in Elixir, and I can confirm that I at least do think that way.

Re: Neovim 0.5 is overpowering

#344
post #195

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…

> 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. Do you mean that you think "word change" instead of "change word"? To me this sounds like you have been programming in Java-like languages for too long :)

Strategy Pattern Change Factory get instance word

Re: Neovim 0.5 is overpowering

#345
post #309

Earlier quoted context omitted.

It is pretty common nowadays in functional programming languages to find operators which reverse the order of application or composition, so rather than writing f(g(h(x))) one can instead write “x |> h |> g |> f”. This style is quite popular, which leads me to believe that many people prefer object-action over action-object in same way. (Although perhaps this is more a critique of action-object-object vs object-actio…

While you didn't refer to any explicit programming language (so your example is correct by definition), I think you may have mixed up something. The order is reversed, but typically not in the way you describe. For your example of f(g(h(x))), you would write (f . g . h) x in Haskell. So for this particular example, the syntactical order is not reversed. However, you could say the natural order of reading is reversed:…

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 (h x))
  λ a (+ 1) (* 2) (+ 3) 1
  9
  λ b (+ 1) (* 2) (+ 3) 1
  9
  λ c (+ 1) (* 2) (+ 3) 1
  9
It's unfortunate that this is named & in Haskell and not |>. And what's worse, it's not in the prelude.

Re: Neovim 0.5 is overpowering

#346
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…

Well, yes. Vimscript plugins will see better adoption. Lua matters for compute-heavy plugins.

> Ahh, yes, the Turing-equivalence fallacy: "technology A is theoretically capable of doing everything that B does, therefore they're equivalent".

Language design is not the full picture. init.lua is essentially a thinly-veiled init.vim with lua syntax. You will have to learn init.vim either way. It is extra work to do something in init.lua, and in using it you remove any chances of it ever working with an installation of vim (e.g. vim still has the best GUI options out there).

Re: Neovim 0.5 is overpowering

#347
post #195

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. Do you mean that you think "word change" instead of "change word"? To me this sounds like you have been programming in Java-like languages for too long :)

Strategy Pattern Change Factory get instance word

You forgot the factory that builds the factory that builds the factory to call get on. I’m sure you’ll need a StringBuilder or two too! ;)

Re: Neovim 0.5 is overpowering

#348
post #281
post #54

Earlier quoted context omitted.

Are there really no plugins for that? In Doom Emacs "cia" deletes an argument normally, which I assume is done by an evil mode plugin, so I thought there was one for Vim as well.

The plugin you are referring to is evil-args ( https://github.com/wcsmith/evil-args ), which is included in Doom Emacs by default.

Thank you! I tried this out on my setup, but was disappointed when it didn’t work. I’m new to evil and I’m constantly impressed with how big the ecosystem is!

Re: Neovim 0.5 is overpowering

#349

I have an honest question, the real advantage of Vi is its installed everywhere, and just works over ssh. What is the benefit of a terminal IDE like neovim or vim with tens of something plugins? Vscode or other powerful IDEs do the work much better.

I use vim + LSP because it's generally faster & responsive than VS Code.

Re: Neovim 0.5 is overpowering

#350
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…

How many people realistically are willing to write vimscript plugins, vs how many people realistically are willing to write Lua? I know personally, after wresting with vimscript for a couple of days I'd never touch it again, but Lua is nice.

Personally I found the quirks of vimscript interesting when I wrote my first and only plugin: https://github.com/nburns/vim-auto-light-dark

somehow being part of the ~50 year lineage of vi editors and scripting was fun to think about

Post reply on HN