I switched from vim to neovim because I thought I needed to to use coc.nvim - turns out I didn't need to, coc.nvim works in vim 8+ As a neovim user who is just having neovim load my vimrc - nothing neovim specific -, I don't see a huge difference. Are there features I am missing out on? I do like the idea of having everything in my vimrc so I could still use it with vim on a server if needed.
Neovim 0.5 is overpowering
321–330 of 429 posts
Re: Neovim 0.5 is overpowering
#322Neovim 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
Re: Neovim 0.5 is overpowering
#323Earlier 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…
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…
However, you could say the natural order of reading is reversed: The naive way to read (f . g . h) might be "first f, then g, then h", opposite the actual order of execution.
Re: Neovim 0.5 is overpowering
#324Earlier 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…
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…
> “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.
Re: Neovim 0.5 is overpowering
#325Earlier quoted context omitted.
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, i…
I do woodworking and construction work. In real life, I always must select first. Apply action second. So to me this feels more natural.
So you’d say that it’s object first because you first get the wood and saw and then decide to saw the wood with it.
I could argue it’s verb first because you first GET the wood and saw.
I’m not saying that I’m right and you’re wrong. In fact, quite the opposite. My point is that I don’t think real life actions can be broken cleanly into object-verb or verb-object, in the first place.
Re: Neovim 0.5 is overpowering
#326Earlier 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…
I think you meant just vU, as you were only capitalising the letter under the cursor.
You can actually also achieve this without entering visual mode: gU{motion} changes to uppercase, so gUl uppercases the letter under the cursor.
Re: Neovim 0.5 is overpowering
#327Earlier 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…
This looks like the sort of thing you would intuitively solve with visual selection and a regex. ``` Vjj:s/\v'(.*)',/'\1': Enum.\u\1,/ ``` This is all just muscle memory. It seems impossible until you get used to it, and then it's the most natural thing in the world.
I know I’ve read that part of the documentation before, but probably not for over five years. In cases where I’ve wanted something like that, I’ve tended to reach for macros, visual block editing, and s/\=. A few days ago I did a somewhat more complicated one that s/\U wouldn’t be sufficient for:
:'s/.*/\=" pub const ".substitute(toupper(submatch(0)), "[^A-Z0-9]\+", "_", "g").": &'static str = \"".submatch(0)."\";"Re: Neovim 0.5 is overpowering
#328NeoVIM seems like a big upgrade over a lot of editors. As a very casual Emacs user who never got excited enough for the "self-documenting and programmable editor" idea, VIM gets more appealing by the day for me. I am also using Spacemacs for a year or so and it's definitely better than normal Emacs. Haven't tried Doom Emacs and I doubt that I will, regardless of a lot of positive feedback. I mean, Emacs is alright bu…
Yes, experienced Emacs users do write some emacs-lisp all the time. But despite the popular belief, it's not about chasing and fixing Elisp errors.
I, for example, write emacs-lisp functions just because I can. Here are some typical examples:
- I have a GitHub link to an issue or a pull-request, I want to download the description of it and make it a proper Org-mode link.
- I want to automatically make a git branch name based on a ticket number (it retrieves the title and shortens it up)
- I want to turn a piece of EDN to JSON and vice-versa
- I want to diff two last pieces I copied into clipboard (side-by-side or otherwise)
- I want to grab a specific value for a Heroku app (based on the context I'm in)
And much more. Of course, one can use any scripting language to do all that, but it won't be integrated with your IDE.
Re: Neovim 0.5 is overpowering
#329Earlier quoted context omitted.
I do woodworking and construction work. In real life, I always must select first. Apply action second. So to me this feels more natural.
I think you’re overestimating how well real life actions map to the object/verb dichotomy. So you’d say that it’s object first because you first get the wood and saw and then decide to saw the wood with it. I could argue it’s verb first because you first GET the wood and saw. I’m not saying that I’m right and you’re wrong. In fact, quite the opposite. My point is that I don’t think real life actions can be broken cle…
"I need some WOOD. I think I'll GET some WOOD."
Re: Neovim 0.5 is overpowering
#330Earlier quoted context omitted.
Nope, you can do find > select all to get multiple selections and edit those simultaneously.
This can be done in (neo)vim too, and with a bit better precision and less typing. :g/ / is the general form for [g]rabbing lines that match a regex and applying a command over them. You can also chain the command: :g/ /g/ / I'll admit this isn't exactly something you intuit as easily as a drop-down menu, but (neo)vim does have tools for all these things out of the box.