blog/content/post/format-code-in-vim.md
2023-01-05 10:57:25 +05:30

1.2 KiB

title date lastmod draft keywords description tags categories author comment toc autoCollapseToc postMetaInFooter hiddenFromHomePage contentCopyright reward mathjax mathjaxEnableSingleDollar mathjaxEnableAutoNumber hideHeaderAndFooter flowchartDiagrams sequenceDiagrams
Format Code in Vim 2023-01-05T10:53:20+05:30 2023-01-05T10:53:20+05:30 false
format indent vim
vim
linux windows
false false false true false false false false false false false
enable options
false
enable options
false

Spend less time formatting your code with this easy trick!

gg=G

That's it. gg Goes to the top of the file. = tells vim to fix the indentation. G goes to the end of the file.