Live data from Hacker News

Neovim 0.5 is overpowering

crispgm.com

121–130 of 429 posts

Re: Neovim 0.5 is overpowering

#121

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…

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.

Re: Neovim 0.5 is overpowering

#122
post #63

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.

The people who actually use neovim disagree with the first and last sentences in your comment.

Shhh, we're playing a game of "pretend pure opinion is a fact and hope no one notices".

Re: Neovim 0.5 is overpowering

#123

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 did record it with qd...q and repeated it with @d @@

Re: Neovim 0.5 is overpowering

#124

The problem with neovim is that it's often not available on corporate environments whereas vim usually is. But nice work anyways

You can pretty easily get around this by downloading the neovim appimage to your home directory and either putting it somewhere in your path or just creating a simple alias.

Re: Neovim 0.5 is overpowering

#125
post #2

Neovim 0.5 is awesome. It has native LSP support, Lua configuration support that it feels like true revolution over past versions. But, getting into optimal setup in neovim/vim involves lot of configuration. Here is mine if you want to refer: https://github.com/varbhat/dotfiles/tree/main/dot_config/nvi...

I tried out the native LSP support few months ago and the docs + features for it seemed poor. I went back to coc.vim

I had the same experience maybe 6 months ago, hopefully having a "blessed" implementation will help/has helped this situation.

I actually was surprised to see the state of the LSP docs in general. Maybe I was missing it, but all the docs I could find only had C# examples of the various objects. I was surprised I couldn't find an exhaustive list of the JSON documents and JSON-RPC endpoints which make up the standard.

Re: Neovim 0.5 is overpowering

#126

Earlier quoted context omitted.

It's a good question. I'm very critical of my tools and I'm a 10+ year vim user, so I've thought a lot about this. vim's "killer feature" is its text editing language and modality. But plenty of other editors and IDEs offer vim emulation to varying degrees of success. So this can't be the reason to use (neo)vim-the-binary as my editor over, e.g., VSCode. So for me the real advantage of vim is in its flexibility. I ca…

You can do that literary everywhere and with any editor, and even without editor. I created this when I was using vim: https://github.com/majkinetor/vim-omnipresence and this to be used with any OS control: https://github.com/majkinetor/isense-x (here used for AHK intelisense but that is just 1 usecase) The real benefit of vim vs any editor is modality and there is AFAIK nothing similar in any editor even with emulat…

Sure, you can make a hotkey to launch any editor, but not every editor is as "pathologically configurable" as vim. The combination of vim being terminal-based, highly-configurable, and lightweight makes it nice to use in a variety of contexts.

Re: Neovim 0.5 is overpowering

#127

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

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…

For me it's been a matter of practice, and forcing myself to use macros for things even when I was too slow with them to justify it in the moment. It pays off eventually and you can get a nice facility with it.

I also like using

  :g/^/norm $normal_commands
to apply anonymous macros across all lines. It works with visual selections too:

  :'g/^/norm $normal_commands
And naturally you can replace the ^ with any regex to selectively apply the macro to only lines that match!

Re: Neovim 0.5 is overpowering

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

As someone who maintains a vimscript plugin... HAHAHAHAHAHAHA

There's API differences between vim8 and neovim that make it a pain to do certain tasks on both (UI manipulation or anything with asynchronous work). Supporting both in the same plugin is annoying. The split is already there and it's only going to get worse, so might as well go with a language that doesn't suck to write. I think upstream vim is the one needing to catch up. Vimscript sucks to write and maintain.

Re: Neovim 0.5 is overpowering

#129

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…

[deleted]
Post reply on HN