Live data from Hacker News

Neovim 0.5 is overpowering

crispgm.com

241–250 of 429 posts

Re: Neovim 0.5 is overpowering

#241

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…

I'll ignore the other parts I disagree with in this post, since it's cool to have different views but I just wanted to post that it may someday be possible to run vim9script plugins in neovim :)

I'm working on a project that might allow at least 90% or higher compat here: https://github.com/tjdevries/vim9jit

Of course, vim9script isn't complete yet, so the spec isn't all the way done, but it may someday be possible to run them in neovim.

Additionally, if someone actually just wanted to port all the C code to run or has some other way to make vim9script run, neovim is not opposed to making that happen.

Re: Neovim 0.5 is overpowering

#242

Earlier quoted context omitted.

No galaxy brain here ;) I generally don't use counts. If I want to go down a few lines, I don't count the number of lines and use 4j or whatever, I instead use / to search for the exact place I want to move to. This feels more natural and preserves the jump-list, so I can ctrl-o back to where I was. Same if I want to delete a few words. I don't count how many I want to delete and do 4daw, instead I do daw and press .…

Instead of counting, you can use :set relativenumber (vim/neovim builtin) to quickly see how far away lines are. (see https://jeffkreeftmeijer.com/vim-number/ )

I tried to get into that for awhile. I tend to look at the line number where I want to jump, and do gg instead. It has the benefit of allowing me to look at a file and get an idea of what's on lines 400 through 425 (for example).

Re: Neovim 0.5 is overpowering

#243

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…

I always find it strange that people recommend a different letter for the register when recommending macros. Why not just use `qq` and `@q` (with the added advantage that clearing the register is `qqq`) ?

Re: Neovim 0.5 is overpowering

#244

It always feels really nice knowing that people are getting excited by your work. Thanks for the shoutout! (I'm tjdevries) Happy to answer any nvim questions while I'm here.

Is anyone in the nvim community working on unifying UI widgets (popovers and pickers) for eventual inclusion in nvim itself? Consistent UI for users and great UI APIs for plugin devs would be a nice perk. I have a couple of nvim plugins in flight and building the UI has been the hardest part so far. (A couple of examples: https://imgur.com/a/RZV2eYJ )

Yup!

We want to create interfaces to make this simpler for people to use.

One example is here: https://github.com/mjlbach/neovim-ui which is just in a separate repo to make it easier to work on rather than one huge PR.

This is an extension of the ideas that I started in https://github.com/nvim-lua/popup.nvim and a few other places.

The idea would to be to create interfaces that users, plugins and/or GUIs could override to provide a unified experience while still being customizable for users.

(and as a self plug, I think we have a lot of interesting ideas in telescope.nvim about UI that could be upstreamed over time)

Re: Neovim 0.5 is overpowering

#245

Earlier quoted context omitted.

I'm sure mine's strictly worse. It was written when I was working in an environment where it was easier to spend 10 hours on something than it was to get permission / access to download vim plugins from the internet.

Gov?

government contractor, yeah. It is insane how much effort there is put into getting butts in chairs for the right number of hours and how little effort goes to actually building something useful.

Re: Neovim 0.5 is overpowering

#246
post #237

Does neovim, or vim for that matter, offer any out of the box support for remote work like Emacs has with tramp-mode? Asking because maybe it's time to try NeoVim out, but it'd be a limitation for my work if I had to go through extra hops for editing remote files and running remote jupyter kernels. I suppose it does, so I'd be grateful if vimmers out there would share their favorite solutions.

Open Vim or Emacs on the remote server. A strength about those two is they work from the terminal.

Re: Neovim 0.5 is overpowering

#247

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…

Before I finished reading your first sentence, I knew you are a Kakoune evangelist.

object-action may be a more natural order in some languages. I use a language which permits both. So I think you're overstating how much of a deal it is. That said, Kakoune has controversial design choices in a couple of areas:

  * no explicit select mode means not only you're selecting text all the time as you move your cursor (which can be annoying). More importantly, it means there are very few keys left on the keyboard for user defined commands. This comes up all the time on the forums whenever someone asks for a new function or an unused leader key. "Fewer modes" is not a virtue in itself, because modes have other benefits like taking the weight off keyboard.
  * Shell as a scripting language. Really. It's completely awful for maintainability.
  * I continue to argue that multi-cursors are a poor man's search&replace. It doesn't show off-screen matches by default, so you don't know if you're matching anything off-screen or not.
There are Kakoune features I like very much, for example improved integration with commandline utilities. You can more easily use them to process the text inside editor.

Re: Neovim 0.5 is overpowering

#248

Earlier quoted context omitted.

You've oddly crystallized why Kakoune has so far failed to grab me! The description you gave of the actions one takes in editing makes sense: in most non-modal editors, you select the text you want to take actions on, then choose the action to take. But, I can do that in literally every modeless editor! That's the way essentially all of them work. But when people write of "Vim as a text editing language" as many comm…

I tend to pick and measure a piece of wood before turning my saw and cutting. I say that I am cutting the wood. But I select it first before marking it and cutting it. I noticed that I use the visual mode of vim a lot. With easy motion to highlight words or other object boundaries to quickly jump to. I tried kakoune and liked it. But after 15y of (neo)vim it's hard to change. That plus how good You completeMe is for…

Well, the reality is that WYSIWYG editing of all sorts is object oriented. You first select the object and then the action.

So it’s not clear whether being more comfortable with selecting an object and then performing an action on it is innately easier for humans, or just what we’ve been conditioned to from using word processors, spreadsheets, or even GUI based file explorers.

But if you look at command line usage, it’s the opposite. Every command first requires you to stare the command, and then the object to act on.

I first type cd and then the folder I want to change directory to, compared to selecting the folder and then hitting enter/CMD+O/double clicking ont he GUI.

But people who have used both the GUI and CMD line rarely ever find the order of operation to be a concern for them, so I suspect the object-verb verb-object difference in vim is just a matter of convenience.

Re: Neovim 0.5 is overpowering

#249
post #121

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…

If your brain prefers that order, you can emulate it in vim by doing v-movement-action, for example viwd to first select an inner word and then delete it.

I tend to do that whenever I'm unsure what my action will actually affect. Pressing one more key is a price I can pay.

Re: Neovim 0.5 is overpowering

#250

I don't want to be flamed or start a debate about the values of one or the other, but why should someone in 2021 go through the hassle of setting up (neo)vim or any other terminal or barebones editor (looking at you emacs) when there's perfect solutions out there that work out of the box with a lot of features that neovim has. For example VSCode uses LSP "natively" and even has an excellent vi emulator you can instal…

> VSCode uses LSP "natively“ What do you mean by this? Is it some kind of same address space thing rather than LSP servers over sockets?

Means you don’t need a plugin. Which is apparently a big deal to some people. Maybe the don’t know how to install plugins...
Post reply on HN