Here’s a sneak peek at my upcoming book named “Technical editing with Vim substitutions”, which shows removing trailing periods from markdown lists:

:%s/\(\(-\|*\|\d*\.\) .\+\)./\1/


Are you just getting started with Vim-substitution-based editing? Don’t worry; the book has your back! This absolute classic is the first substitution I always reach for first. Never remove trailing whitespace manually again!

:%s/ \+\n/\r/

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!