Live data from Hacker News

Neovim 0.5 is overpowering

crispgm.com

101–110 of 429 posts

Re: Neovim 0.5 is overpowering

#101

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 has pros and cons, it has a nice web compatible view for multimedia. VSCode doesn't even support printing, which is weird. It's a memory hog and slow to start.

Re: Neovim 0.5 is overpowering

#102
post #86

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…

Have you tried https://github.com/nvim-treesitter/nvim-treesitter-textobjec... ?

Not yet! I just moved to 0.5 this weekend. But thanks for the link!

Re: Neovim 0.5 is overpowering

#103

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

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 .…

For me, learning about . was what made learning many of (neo)vim’s motions and text objects worthwhile. I use . constantly.

Re: Neovim 0.5 is overpowering

#104

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

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 talking to your text editor vs leaving home row to click stuff.

Re: Neovim 0.5 is overpowering

#105

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

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 qdyi'f,i: Enum.pbvlUq and then repeat macro.

I found it very slow to even recall.

For some reason the multicursor solution feels faster to me most times.

Re: Neovim 0.5 is overpowering

#106
post #94

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.

> Vscode or other powerful IDEs do the work much better. Better how? As much as I respect VSC and IDEA authors - they are often 'too much' and too heavy. IDEA (and its children like Goland) in particular.

VSCode is also way too bloated for me.

Re: Neovim 0.5 is overpowering

#107
post #85

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…

What treesitter module does this fall under? I'm having a hard time finding this in the documentation. Or do users have to add this functionality themselves? Are there reference implementations for what you are describing?

Right, Treesitter just gives the client program a syntax tree; it will be up to Neovim to map that to editing commands. (And the fidelity will depend on the quality of the specific language's Treesitter parser.)

Re: Neovim 0.5 is overpowering

#108

Earlier quoted context omitted.

I spent 10 hours learning enough vimscript to make a command to check if a line is commented, comment it if not, or uncomment if it is, be able to handle multiple filetype and comment chars, and be able to handle proper indentation and multi-line selection. I have to imagine it would be simpler in other languages. Vimscript is hard.

Out of curiosity, does your's have any benefits over NERDCommenter?

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.

Re: Neovim 0.5 is overpowering

#109

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…

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 example.

Re: Neovim 0.5 is overpowering

#110

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

You could ask the same question to anyone who touch types.

Muscle memory is a marvellous thing.

Post reply on HN