How to apply new textwidth to whole buffer in Vim


How to apply new textwidth to whole buffer in Vim



I've changed the textwidth option mid-way through my file and I'd like to reformat the whole buffer to use the new width. What's the quickest way to do this?


Solution - Vim documentation topic

gq




How to open a new window below a split created by vimdiff?

1:



Hide all (not)matching lines in Vim


Using diffget in vimdiff


How to get the func prototype after selecting the func via omnicppcomplete?

2:



How to avoid indentation error after changing tab stops in Vim?
gq<motion> 
For example, if your file consists of 100 lines, move to the first line and then press:.
Tips and tricks for emacs' viper-mode and the likes [closed]
gq100<Down Arrow> 
You can use the visual mode to select the lines and then press gq as well..



85 out of 100 based on 75 user ratings 1075 reviews