To delete lines 4-12 in Vim::4,12 d
To replace the word foo with the word bar starting at the line where the cursor is through the end of the file::.,$s/foo/bar/
To remove the spaces in the middle of a pip list output line and replace it with == so it can be used to install (if you have to recreate your pyenv):
:%s/([^ ]+ ) +/\1==/g
:%s/ ==/==/
To remove == and everything after from a pip list so that pip will install the newest version:
:%s/==.*//
To reformat a paragraph in vim:Use <CTRL-J> to join all lines in the paragraph
:gq
To remove all commented and blank lines from a file::g/\v^(#|$)/d