News for hackers. Stuff that matters.
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)."\";"
Re:Neovim 0.5 is overpowering by mFixman on Thursday May 27, 2021 @04:25AM (#27300593)
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.