To change your tab size in Vim, first at the command line, type:
This will open the user preferences file for Vim, creating it if the files doesn't already exist. You will then be popped into your Vim editor, where you can enter your preferences. Remember to type the letter a to enter insert mode. Otherwise, anything you type will be interpreted as a Vim command. Ready?
Here's where you can paste all those nifty
Press the esc key to re-enter command mode then :wq to save and exit. Re-open Vim and voila! You've just set your tabs to 4 spaces!
My second trick is much shorter, but it's a great little command just the same. When working in Git, before you add any files using git add type
to see the changes you've made across all of the files in your working repository. If you've already started tracking the files using git add, type
git diff --cached
It gives you lovely output such as:
That's all for now. Happy coding, everyone!