In Vim wrapping lines at 80 characters without breaking words can be done with the following commands according to this article:
:set formatoptions+=w
:set tw=80
gggqG
Setting 80 char wrap is accomplished by typing gggqG
after the two :set ...
commands.
Is it possible to change gggqG
to gqG
or ggq
and if so how?
The article also mentions: "Use the following mapping to format the current paragraph"
:nnoremap Q gqip
What does "mapping" mean in this case, and what are the advantages between the two approaches?
nnoremap Q gq
(coupled withnnoremap QQ gqq
) so that I can use any text objects I want.