Skip to content

Instantly share code, notes, and snippets.

@anotheremily
Created August 7, 2013 13:21
Show Gist options
  • Save anotheremily/6173974 to your computer and use it in GitHub Desktop.
Save anotheremily/6173974 to your computer and use it in GitHub Desktop.
Force 80 Character Lines in Vim
Set textwidth to 80, move to the start of the file (can be done with Ctrl-Home or gg), and type gqG.
gqG formats the text starting from the current position and to the end of the file. It will automatically join consecutive lines when possible. You can place a blank line between two lines if you don't want those two to be joined together.
(http://stackoverflow.com/questions/3033423/vim-command-to-restructure-force-text-to-80-columns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment