Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Vim Country Substitution for pacman.d/mirrorlist
" This is a substitution command for VIM where you can replace the word´Sweden´ with the country you want to keep.
" Whenever I install Arch linux on my machines, I usually only keep the mirrors from my country. If you do the
" same thing, you can use this to do it fast!
:%s/^##\s\(Sweden\)\@!\(.*\)\nServer = .*\n//
" Do you have any suggestions on making it better? Please comment!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment