Reformat or fix the indentation of an entire file in vim
Tools:
- 1 ea vim
1Set the indentation rules in your .vimrc
2With the target file open in vim type
gg=G
“=” is the indent command and it can takes motions. So “gg” means start at the beginning of the file and “G” means finish at the end.
Now learn about:
Discuss this guide
var disqus_shortname = ‘howchootest’; (function() { var dsq = document.createElement(‘script’); dsq.type = ‘text/javascript’; dsq.async = true; dsq.src = ‘//’ + disqus_shortname + ‘.disqus.com/embed.js’; (document.getElementsByTagName(‘head’)[0] || document.getElementsByTagName(‘body’)[0]).appendChild(dsq); })();
Tools:
- 1 ea vim
Join Us
©2014 howchoo.com | About your privacy | Sitemap