Added “gq” (format text) command for the Vi Input Mode

It’s been a nice week here in Berlin at the Desktop summit. I have even got some coding done. A command I often missed from Vim was the gq command that re-formats text based on your text width setting. For example, if you want to stick to a sixty-columns layout, you often have to re-format the text when adding or removing something, like in this screenshot where some text has been surrounded by HTML tags:

By using the gq command, the text will be re-formatted and looks nice again:

I have implemented this command now, so this will be in Kate for KDE 4.8. I hope other users of the Vi Input Mode find it useful too. :-)

See also