What is difference between autoformat and autoindent? What are most popular solutions in text formating in vim of both of these methods?
As the name suggests, autoindent helps mainly in indenting source code, while autoformat can be used while editing text.
For more information, you can access vim help by typing
:help autoindent and
See this post for additional info: https://stackoverflow.com/questions/2355834/how-can-i-autoformat-indent-c-code-in-vim. It also addresses the 2nd part of your question.
Vim wiki at wikia has pages on these topics too: http://vim.wikia.com/wiki/Indenting_source_code http://vim.wikia.com/wiki/Automatic_formatting_of_paragraphs