Re:Neovim 0.5 is overpowering
by chrismorgan on Wednesday May 26, 2021 @09:22PM
(#27298275)
TIL s/\u, thanks!
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)."\";"Vim's documentation is complete and very well-written. I've been using the editor for over 10 years and I still learn new things when perusing :help.
Re:Neovim 0.5 is overpowering
by ARandomerDude on Wednesday May 26, 2021 @02:04PM
(#27293957)
Yes! When I first came from Sublime 2 I thought Vim was irritatingly difficult but hoped it would be worth it. Now I wouldn't program without it.
```
```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.