When I use `gqap’ command to reflow a paragraph in vim, vim seems to try to be smart and adds indentation automatically, e.g.
- When a line ends with a ‘,’:
We protect your rights with two steps: (1) copyright the software, and (2), offer you this license which gives you legal permission to copy, distribute and/or modify the software.
- When a line has unmatched brackets:
Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term 'modification'.) Each licensee is addressed as 'you'.
Is there a way to turn this off?
Thanks!
What filetype do you do this in? And what is the output of ‘:set’?
If you copy your texts to an empty file, it formats it the way you want it. I have smartindent and autoindent enabled, so you could try that. (set si, set ai)