SoftWrap vim command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Turn hard wrapped text into soft wrapped. | |
" This command will join all lines within a range that are not separated | |
" by empty lines. Automatic word wrap must be off (set fo-=a). | |
" Useful if you need to copy and paste into a word processor. | |
command! -range=% SoftWrap | |
\ <line2>put _ | | |
\ <line1>,<line2>g/.\+/ .;-/^$/ join |normal $x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment