How To Reformat or Re-indent Files in VIM

Author: , January 11th, 2019

UPDATE 07-March-2025 Please visit: How To Prettify Using Vim and Prettier In the normal vim mode, typing gg=G will reindent the entire file. == will re-indent just the current line. http://vim.wikia.com/wiki/Fix_indentation

How To Fix Indentation in Vi

Author: , July 30th, 2014

UPDATE 07-March-2025 Please visit: How To Prettify Using Vim and Prettier gg=G gg to get to the top of the file, = to indent, and G to the go to the end of the file.