I insert this text in Vim:t tttt ttttttttt tt tttt tt ttt tttttt-tttt-ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt ttttt ttt ttt ttttttttttttt tttt ttttttt: ttttttt tt ttttttt, ttttttt tt tttttt, tttttt tt ttttttt,tttttt tt tttttt ttt. t tttttt tt ttt (tttt) ttttttt-tttttt-tt-ttttttt ttttttfor the tttttt in ttttttt part of the issue (in the previous week I haveworked on the objects in objects part). This part is about making itpossible for the end user to add arrays in objects. First of all I checkedthat the current implementation allows putting arrays in objects at leastfrom the schema passed to the plugin constructor.then I visually select all these lines and press gq. The contents become:t tttt ttttttttt tt tttt tt ttt tttttt-tttt-ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt ttttt ttt ttt ttttttttttttt tttt ttttttt: ttttttt tt ttttttt, ttttttt tt tttttt, tttttt tt ttttttt,tttttt tt tttttt ttt. t tttttt tt ttt (tttt) ttttttt-tttttt-tt-ttttttt ttttttfor the tttttt in ttttttt part of the issue (in the previous week I have    worked on the objects in objects part). This part is about making it    possible for the end user to add arrays in objects. First of all I checked    that the current implementation allows putting arrays in objects at least    from the schema passed to the plugin constructor.Please explain to me why there is that whitespace at the beginning of the last four lines. Is it possible that the first word (for) on the fifth line, which in some programming languages starts a for loop, makes Vim think it should start a new indented block of code, even if these lines are in an unsaved file or in a Markdown file? How can I avoid this behavior and make gq stop inserting that whitespace?My comments setting has the default value: s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-. You can see my .vimrc file here.Update: My fo (formatoptions) option has the value tcq, the formatexpr and formatprg options are empty.
Unexplained gq indentation issue
indentation;formatting
The problem is that you have set smartindent in your ~/.vimrc. The smartindent options causes Vim to assume that your text is some C-like programming language when indenting. Among other things, it treats for like a keyword and gives an extra level of indentation to the line following. See:help 'smartindent':help 'cinwords'