News for hackers. Stuff that matters.
Re:My Favorite Vim Oneliners for Text Manipulation by eviks on Saturday August 05, 2023 @08:53PM (#37017831)
It's not a sign of "unparalleled efficiency" having to type these little monstrosities by hand, let alone frequently

:g/\(\d\{1,3}\.\)\{3}\d\{1,3\}/y A

Is there a way to type "ip" and select from a helper list with regex and description sorted by frecency?

Re:My Favorite Vim Oneliners for Text Manipulation by nerdponx on Saturday August 05, 2023 @09:14PM (#37017968)
Yes, you can define your own commands to do whatever you want. For things like fuzzy search and frecency sorting, there are a handful of plug-ins and frameworks that can help, including an FZF interface and a few other Vim/Neovim-specific plugins like Telescope and Denite.
Re:My Favorite Vim Oneliners for Text Manipulation by danielvaughn on Saturday August 05, 2023 @09:18PM (#37017997)
That was my first thought when I saw these. I’ve been interested in learning Vim but these look like hell to type.
Re:My Favorite Vim Oneliners for Text Manipulation by atorodius on Sunday August 06, 2023 @02:38AM (#37019525)
You don’t need these.

I‘ve been viming for 10+ y and just using the normal shortcuts and ways of manipulating text is a major productivity gain.

Re:My Favorite Vim Oneliners for Text Manipulation by imbnwa on Sunday August 06, 2023 @03:28AM (#37019725)
Vim regex engine descends from vi and ed, which predate Perl Compatible Regular Expressions, whose derivative forms we're all familiar with
Re:My Favorite Vim Oneliners for Text Manipulation by danielvaughn on Sunday August 06, 2023 @10:58AM (#37022677)
Yep I'm familiar with regular expressions, but I don't typically use them as a command prompt.
Re:My Favorite Vim Oneliners for Text Manipulation by imbnwa on Sunday August 06, 2023 @03:14PM (#37025496)
Yeah, just explaining why it looks weird
Re:My Favorite Vim Oneliners for Text Manipulation by 000ooo000 on Saturday August 05, 2023 @08:55PM (#37017859)
Not an answer to your question, but FYI, command history (q:) might be useful for you if you hadn't come across it yet.
Re:My Favorite Vim Oneliners for Text Manipulation by jdkardia on Sunday August 06, 2023 @12:19AM (#37018947)
if you have already used the command you want recently, just start writing the command you want, then press the up arrow to search through your history for commands that start with whatever you've typed so far.

also, a nit pick, if you use Magic mode (\v), that pattern gets way better:

:g/\v(\d{1,3}\.){3}\d{1,3}/y A