title: How to run a vim command on a file from the terminal?
body: <p>I want to run a vim command for example <code>gg=G</code> but in the terminal.</p>
  <p>I have tried <code>vim gg=G filename</code>  but it didn't work.</p>
  <p>This would be useful as I normally work on gedit, but vim is very powerful, so would be cool to use some of its features without having to enter file in vim running the command and exiting vim, especially since exiting takes 14 contextually dependent instructions.</p>
  <p>the other question with a similar name as this one, is about a different topic: <a href="https://stackoverflow.com/questions/13522599/how-to-run-vim-commands-from-terminal">How to run vim commands on vim it self</a>. While this question is about runing vim command on a file</p>